/* Claudex
 * Layout: menu lateral recolhível + cabeçalho fixo com período/filtro/exportar.
 * v4: acima de 760 × 420 px a tela inteira cabe na janela (sem rolagem da página); só listas e tabelas rolam.
 * O conteúdo é um contêiner de tamanho (container queries): cada tela se reorganiza pela largura e altura que sobram,
 * o que acompanha o zoom do navegador (80–150%) sem medir nada em JS. Abaixo disso, volta a rolar a página (celular).
 * Visual: base neutra (branco / grafite), botões em pílula, menus flutuantes arredondados. Cor só para dados e estado.
 * Séries de dados validadas (dataviz): azul, laranja, verde-água, amarelo — claro e escuro com passos próprios.
 */
:root {
  --bg: #ffffff; --side: #f9f9f9; --card: #ffffff; --soft: #f4f4f4; --soft-2: #ebebeb; --hover: rgb(0 0 0 / .045);
  --line: #e7e7e7; --line-2: #f0f0f0;
  --ink: #0d0d0d; --ink-2: #5d5d5d; --ink-3: #8f8f8f;
  --primary: #0d0d0d; --on-primary: #ffffff;
  --accent: #2a78d6; --accent-soft: #e9f1fc;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100;
  --good: #0ca30c; --warn: #fab219; --bad: #d03b3b;
  --good-soft: #e8f6e8; --warn-soft: #fff4dc; --bad-soft: #fcebeb;
  --good-ink: #0a7a0a; --warn-ink: #8a5a00; --bad-ink: #b42318;
  --shadow: 0 0 0 1px rgb(0 0 0 / .05), 0 9.5px 25.5px -6.5px rgb(0 0 0 / .18);
  --font: "Instrument Sans", ui-sans-serif, -apple-system, "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --side-w: 208px;
  --line-strong: #d6d6d6; --code-bg: #f7f7f6; --code-bar: #efefed; --code-ink: #b4421f;
  --sx-key: #7a3fd1; --sx-str: #0f7a4f; --sx-num: #b45309; --sx-com: #8f8f8f; --sx-fn: #2463c4; --sx-prop: #a3367a;
  --ease-out: cubic-bezier(.2, .7, .2, 1); --ease-spring: cubic-bezier(.34, 1.56, .64, 1); --sheen: rgb(255 255 255 / .38);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #212121; --side: #171717; --card: #262626; --soft: #303030; --soft-2: #3a3a3a; --hover: rgb(255 255 255 / .06);
    --line: #363636; --line-2: #2d2d2d; --ink: #ececec; --ink-2: #b4b4b4; --ink-3: #8b8b8b;
    --primary: #ececec; --on-primary: #171717; --accent: #3987e5; --accent-soft: #1d2b3f;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
    --good-soft: #17301b; --warn-soft: #3a2f12; --bad-soft: #3d1c1c; --good-ink: #5fd06a; --warn-ink: #f2c14e; --bad-ink: #f28b82;
    --shadow: 0 0 0 1px rgb(255 255 255 / .07), 0 11px 29px -5px rgb(0 0 0 / .6);
    --line-strong: #4a4a4a; --code-bg: #1b1b1b; --code-bar: #232323; --code-ink: #f2a07b;
    --sx-key: #c3a6ff; --sx-str: #7fd6a8; --sx-num: #f0b35a; --sx-com: #8b8b8b; --sx-fn: #8fb8ff; --sx-prop: #f09ccf; --sheen: rgb(255 255 255 / .07);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #212121; --side: #171717; --card: #262626; --soft: #303030; --soft-2: #3a3a3a; --hover: rgb(255 255 255 / .06);
  --line: #363636; --line-2: #2d2d2d; --ink: #ececec; --ink-2: #b4b4b4; --ink-3: #8b8b8b;
  --primary: #ececec; --on-primary: #171717; --accent: #3987e5; --accent-soft: #1d2b3f;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
  --good-soft: #17301b; --warn-soft: #3a2f12; --bad-soft: #3d1c1c; --good-ink: #5fd06a; --warn-ink: #f2c14e; --bad-ink: #f28b82;
  --shadow: 0 0 0 1px rgb(255 255 255 / .07), 0 11px 29px -5px rgb(0 0 0 / .6);
  --line-strong: #4a4a4a; --code-bg: #1b1b1b; --code-bar: #232323; --code-ink: #f2a07b;
  --sx-key: #c3a6ff; --sx-str: #7fd6a8; --sx-num: #f0b35a; --sx-com: #8b8b8b; --sx-fn: #8fb8ff; --sx-prop: #f09ccf; --sheen: rgb(255 255 255 / .07);
  color-scheme: dark;
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 12.5px/1.5 var(--font); font-feature-settings: "tnum" 1; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-soft); }
* { scrollbar-width: thin; scrollbar-color: var(--soft-2) transparent; }
.ic { width: 14.5px; height: 14.5px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic.dots { stroke-width: 3.2; }
.mono { font-family: var(--mono); font-size: .88em; letter-spacing: -.01em; }
.muted { color: var(--ink-2); }
.small { font-size: 11px; }
.center { text-align: center; }
.nr { color: var(--ink-3); }
.bad-ink { color: var(--bad-ink); }
.row { display: flex; align-items: center; gap: 6.5px; }
.row.tight { gap: 3px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 11px; }
.scroll { overflow-x: auto; }
.skip { position: fixed; left: 9.5px; top: 9.5px; z-index: 100; background: var(--card); padding: 8px 11px; border-radius: 9.5px; transform: translateY(-200%); }
.skip:focus { transform: none; box-shadow: var(--shadow); }

/* ---------------------------------------------------------------- botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5.5px; min-height: 30.5px; padding: 0 13px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  font-weight: 550; font-size: 12.5px; white-space: nowrap; transition: background .15s, border-color .15s, opacity .15s;
}
.btn:hover:not(:disabled) { background: var(--soft); }
.btn:disabled { opacity: .45; }
.btn .ic { width: 13.5px; height: 13.5px; }
.btn .ext { width: 11px; height: 11px; opacity: .6; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn.primary:hover:not(:disabled) { opacity: .86; background: var(--primary); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.danger:hover:not(:disabled) { opacity: .88; background: var(--bad); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover:not(:disabled) { background: var(--hover); }
.btn.sm { min-height: 25.5px; padding: 0 9.5px; font-size: 11.5px; }
.btn.lg { min-height: 38.5px; font-size: 13.5px; }
.btn.block { width: 100%; }
.btn.chip-btn { min-height: 29px; padding: 0 9.5px; gap: 5px; font-weight: 500; }
.btn.chip-btn.active { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.btn.chip-btn .dd-chev { width: 12px; height: 12px; opacity: .55; }
.btn.chip-btn.open { background: var(--soft); }
.count { min-width: 14.5px; height: 14.5px; padding: 0 4px; border-radius: 7px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 650; display: inline-grid; place-items: center; }
.icon-btn {
  width: 29px; height: 29px; display: inline-grid; place-items: center; border-radius: 8px; border: 0; background: transparent; color: var(--ink-2); flex: none;
  transition: background .15s, color .15s;
}
.icon-btn:hover:not(:disabled), .icon-btn.open { background: var(--hover); color: var(--ink); }
.icon-btn.on { background: var(--soft); color: var(--ink); }
.icon-btn.sm { width: 24px; height: 24px; border-radius: 6.5px; }
.icon-btn:disabled { opacity: .35; }
.link-btn { display: inline-flex; align-items: center; gap: 2px; border: 0; background: none; color: var(--ink-2); font-size: 11.5px; font-weight: 500; padding: 3px 5px; border-radius: 6.5px; }
.link-btn:hover { color: var(--ink); background: var(--hover); }
.link-btn .ic { width: 12px; height: 12px; }

@keyframes ping { 70% { box-shadow: 0 0 0 6px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ---------------------------------------------------------------- campos */
.field { position: relative; }
.field input {
  width: 100%; height: 41.5px; padding: 16px 13px 5px; border: 1px solid var(--line); border-radius: 11px; background: var(--card);
  transition: border-color .15s, box-shadow .15s;
}
.field input.mono { font-size: 11.5px; }
.field label { position: absolute; left: 13.5px; top: 12px; color: var(--ink-3); pointer-events: none; transition: transform .15s, font-size .15s, top .15s; transform-origin: left; }
.field input:focus, .field input:focus-visible { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.field input:focus + label, .field input:not(:placeholder-shown) + label { top: 5px; font-size: 10.5px; }
.field.has-btn input { padding-right: 40px; }
.field-btn { position: absolute; right: 6.5px; top: 6.5px; width: 29px; height: 29px; border-radius: 8px; border: 0; background: none; color: var(--ink-3); display: grid; place-items: center; }
.field-btn:hover { background: var(--hover); color: var(--ink); }
.search-wrap { position: relative; display: flex; align-items: center; }
.search-wrap > .ic { position: absolute; left: 9.5px; width: 13px; height: 13px; color: var(--ink-3); pointer-events: none; }
.search-in { width: 100%; height: 29px; padding: 0 9.5px 0 29px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); }
.search-in:focus-visible { outline: none; border-color: var(--ink-3); }
.search-wrap.big .search-in { height: 33.5px; border-radius: 999px; padding-left: 32px; background: var(--soft); border-color: transparent; }
.search-wrap.big > .ic { left: 12px; }
.search-wrap.big .search-in:focus { background: var(--card); border-color: var(--line); }

.checkbox { width: 14.5px; height: 14.5px; border-radius: 4px; border: 1.5px solid var(--ink-3); display: inline-grid; place-items: center; flex: none; transition: background .12s, border-color .12s; }
[aria-checked="true"] > .checkbox { background: var(--primary); border-color: var(--primary); }
[aria-checked="true"] > .checkbox::after { content: ""; width: 7px; height: 4px; border: 2px solid var(--on-primary); border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }

.switch { width: 32px; height: 19px; border-radius: 9.5px; border: 0; padding: 2.5px; background: var(--soft-2); display: inline-flex; flex: none; transition: background .18s; }
.switch .knob { width: 14.5px; height: 14.5px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: transform .18s; }
.switch[aria-checked="true"] { background: var(--good); }
.switch[aria-checked="true"] .knob { transform: translateX(16px); }
.switch:disabled { opacity: .5; }
.switch-row { display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--ink-2); }

.seg { display: inline-flex; padding: 2.5px; gap: 2px; border-radius: 999px; background: var(--soft); }
.seg button { border: 0; background: transparent; height: 24px; padding: 0 10.5px; border-radius: 999px; font-size: 11.5px; font-weight: 550; color: var(--ink-2); display: inline-grid; place-items: center; }
.seg button:hover { color: var(--ink); }
.seg button[aria-checked="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / .1), 0 0 0 1px var(--line); }
.seg button .ic { width: 13px; height: 13px; }

.dd {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 6.5px; height: 29px; padding: 0 8px 0 11px;
  border-radius: 8px; border: 1px solid var(--line); background: var(--card); font-weight: 500; text-align: left; min-width: 0; max-width: 100%;
}
.dd:hover:not(:disabled), .dd.open { background: var(--soft); }
.dd:disabled { opacity: .6; cursor: default; }
.dd-val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-chev { width: 13px; height: 13px; color: var(--ink-3); transition: transform .15s; }
.dd.open .dd-chev { transform: rotate(180deg); }
.dd.dd-title { border-color: transparent; background: transparent; height: 25.5px; padding: 0 5px 0 6.5px; font-size: 13.5px; font-weight: 650; border-radius: 6.5px; }
.dd.dd-title:hover, .dd.dd-title.open { background: var(--hover); }
.dd.dd-sm { height: 25.5px; font-size: 11.5px; border-radius: 999px; }
.dd.dd-field { width: 100%; height: 32px; }

/* ---------------------------------------------------------------- flutuantes */
.layer { position: relative; z-index: 60; }
.pop {
  position: fixed; z-index: 70; min-width: 176px; max-width: min(288px, calc(100vw - 13px)); max-height: min(384px, calc(100vh - 19px));
  overflow: auto; background: var(--card); border-radius: 13px; box-shadow: var(--shadow); padding: 5px; animation: pop-in .12s ease-out;
}
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.pop.pop-filters { width: 240px; }
.backdrop { position: fixed; inset: 0; z-index: 69; background: rgb(0 0 0 / .35); animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.pop.sheet {
  left: 0 !important; right: 0; bottom: 0; top: auto !important; width: 100%; max-width: none; max-height: 80vh; min-width: 0;
  border-radius: 17.5px 17.5px 0 0; padding: 3px 6.5px calc(9.5px + env(safe-area-inset-bottom, 0px)); animation: sheet-up .2s ease-out;
}
@keyframes sheet-up { from { transform: translateY(40px); opacity: .4; } }
.sheet-top { display: flex; flex-direction: column; align-items: center; gap: 6.5px; padding: 5px 0 6.5px; }
.sheet-top b { font-size: 13.5px; }
.grabber { width: 29px; height: 3px; border-radius: 2px; background: var(--soft-2); }
.menu { display: flex; flex-direction: column; }
.menu-item {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 30.5px; padding: 5.5px 8px; border: 0; background: transparent;
  border-radius: 8px; text-align: left; font-size: 12.5px; color: var(--ink);
}
.menu-item:hover:not(:disabled), .menu-item:focus-visible { background: var(--hover); outline: none; }
.menu-item:disabled { opacity: .4; }
.menu-item > .ic { color: var(--ink-2); }
.menu-item.danger, .menu-item.danger > .ic { color: var(--bad-ink); }
.mi-text { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.3; }
.mi-text small { color: var(--ink-3); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mi-hint { font-size: 11px; color: var(--accent); font-weight: 650; }
.mi-tick { width: 14.5px; display: grid; place-items: center; }
.mi-tick .ic { width: 13px; height: 13px; }
.mi-chev { width: 13px; height: 13px; color: var(--ink-3); }
.menu-sep { height: 1px; background: var(--line-2); margin: 4px 5px; }
.menu-empty { padding: 13px; text-align: center; color: var(--ink-3); font-size: 11.5px; }
.menu-user { display: flex; align-items: center; gap: 8px; padding: 6.5px 8px; }
.menu-user b { display: block; font-weight: 600; }
.menu-user small { font-size: 11px; }
.menu-theme { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 3px 5px 3px 9.5px; font-size: 12.5px; }
.menu-theme .seg button { padding: 0 8px; }
.filters-head { display: flex; align-items: center; gap: 3px; padding: 2px 2px 5px; }
.filters-head b { font-size: 12.5px; }
.filters .search-wrap { margin: 0 3px 5px; }

.tip {
  position: fixed; z-index: 90; pointer-events: none; background: var(--primary); color: var(--on-primary);
  padding: 5px 8px; border-radius: 7px; font-size: 11px; font-weight: 500; max-width: 208px; line-height: 1.4; box-shadow: 0 4px 14px rgb(0 0 0 / .18);
}
.tip table { border-collapse: collapse; margin-top: 3px; }
.tip td { padding: 1px 5px 1px 0; white-space: nowrap; }
.tip td.num { text-align: right; padding-left: 11px; font-weight: 650; }
.tip .key { width: 6.5px; height: 6.5px; }
.tip-total td { padding-top: 3px; opacity: .8; }
.tip-muted { opacity: .7; }

.toast {
  position: fixed; left: 50%; bottom: calc(19px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 95;
  display: flex; align-items: center; gap: 7px; background: var(--primary); color: var(--on-primary); padding: 9px 14.5px; border-radius: 999px;
  font-weight: 500; box-shadow: 0 8px 28px rgb(0 0 0 / .22); max-width: calc(100vw - 25.5px); animation: toast-in .2s ease-out;
}
@keyframes toast-in { from { transform: translate(-50%, 12px); opacity: 0; } }
.toast .ic { width: 13.5px; height: 13.5px; }
.toast.good .ic { color: var(--good); }
.toast.bad .ic { color: var(--bad); }

/* gaveta e modal */
dialog { color: var(--ink); }
.drawer {
  margin: 0 0 0 auto; height: 100%; max-height: 100%; width: min(384px, 100vw); max-width: 100vw; padding: 0; border: 0;
  background: var(--card); box-shadow: var(--shadow); overflow: hidden;
}
.drawer[open] { display: flex; flex-direction: column; animation: drawer-in .2s ease-out; }
@keyframes drawer-in { from { transform: translateX(28px); opacity: 0; } }
.drawer::backdrop, .modal::backdrop { background: rgb(0 0 0 / .4); animation: fade .15s; }
.drawer-head { display: flex; align-items: flex-start; gap: 9.5px; padding: calc(14.5px + env(safe-area-inset-top, 0px)) 16px 9.5px 19px; }
.drawer-head .grabber { display: none; }
.drawer-titles { flex: 1; min-width: 0; }
.drawer-kicker { font-size: 11px; color: var(--ink-3); }
.drawer-head h2 { font-size: 18px; font-weight: 650; overflow-wrap: anywhere; letter-spacing: -.01em; }
.drawer-body { flex: 1; overflow-y: auto; padding: 3px 19px calc(22.5px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 14.5px; }
.modal {
  width: min(368px, calc(100vw - 25.5px)); padding: 0; border: 0; border-radius: 17.5px; background: var(--card); box-shadow: var(--shadow); overflow: visible;
}
.modal[open] { animation: modal-in .18s ease-out; }
@keyframes modal-in { from { transform: translateY(8px) scale(.98); opacity: 0; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 9.5px; padding: 16px 13px 3px 19px; }
.modal-head h2 { font-size: 16px; font-weight: 650; }
.modal-body { padding: 9.5px 19px 6.5px; display: flex; flex-direction: column; gap: 11px; max-height: 65vh; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 6.5px; padding: 9.5px 16px 16px; }

/* ---------------------------------------------------------------- login */
.boot { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); }
.boot-mark { width: 22.5px; height: 22.5px; border-radius: 50%; border: 2.5px solid var(--soft-2); border-top-color: var(--ink); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.login { min-height: 100vh; display: grid; place-items: center; padding: 19px 13px; background: var(--bg); }
.login-card { width: min(304px, 100%); display: flex; flex-direction: column; gap: 11px; }
.login-card .logo { align-self: center; margin-bottom: 8px; }
.login-card h1 { text-align: center; font-size: 25px; font-weight: 650; letter-spacing: -.02em; margin-bottom: 9.5px; }
.login-error { color: var(--bad-ink); font-size: 12px; background: var(--bad-soft); padding: 8px 11px; border-radius: 9.5px; }
.login-foot { text-align: center; color: var(--ink-3); font-size: 11px; margin-top: 14.5px; }
.logo { width: 25.5px; height: 25.5px; border-radius: 8px; background: var(--primary); color: var(--on-primary); display: inline-grid; place-items: center; flex: none; }
.logo .logo-ic { width: 16px; height: 16px; stroke-width: 2.4; }
.logo.lg { width: 41.5px; height: 41.5px; border-radius: 13px; }
.logo.lg .logo-ic { width: 24px; height: 24px; }

/* ---------------------------------------------------------------- moldura */
.app { min-height: 100vh; }
.side {
  position: fixed; inset: 0 auto 0 0; z-index: 40; width: var(--side-w); display: flex; flex-direction: column; gap: 5px;
  background: var(--side); padding: 8px 8px 8px; transition: width .2s ease, transform .22s ease;
}
.side-top { display: flex; align-items: center; justify-content: space-between; gap: 5px; height: 35px; padding: 0 0 0 5px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 14.5px; letter-spacing: -.01em; padding: 3px; border-radius: 8px; min-width: 0; }
.brand .logo { width: 22.5px; height: 22.5px; border-radius: 7px; }
.brand .logo .logo-ic { width: 14.5px; height: 14.5px; }
.nav { display: flex; flex-direction: column; gap: 1px; margin-top: 8px; }
.nav a { position: relative; display: flex; align-items: center; gap: 9.5px; height: 30.5px; padding: 0 8px; border-radius: 8px; color: var(--ink); font-size: 12.5px; font-weight: 450; white-space: nowrap; overflow: hidden; }
.nav a:hover { background: var(--hover); }
.nav a[aria-current="page"] { background: var(--soft-2); font-weight: 600; }
.nav a .ic { color: var(--ink-2); }
.nav a[aria-current="page"] .ic { color: var(--ink); }

.side-foot { margin-top: auto; }
.me { width: 100%; display: flex; align-items: center; gap: 8px; height: 38.5px; padding: 0 6.5px; border: 0; border-radius: 9.5px; background: transparent; text-align: left; }
.me:hover, .me.open { background: var(--hover); }
.me-name { flex: 1; min-width: 0; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-more { color: var(--ink-3); }
.app.collapsed { --side-w: 51px; }
.app.collapsed .brand-name, .app.collapsed .nav-label, .app.collapsed .me-name, .app.collapsed .me-more, .app.collapsed .brand { display: none; }
.app.collapsed .side-top { justify-content: center; padding: 0; }
.app.collapsed .nav a { justify-content: center; padding: 0; }

.app.collapsed .me { justify-content: center; padding: 0; }
.scrim { position: fixed; inset: 0; z-index: 35; background: rgb(0 0 0 / .4); animation: fade .15s; }

.main { margin-left: var(--side-w); min-width: 0; transition: margin-left .2s ease; }
.top {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 19px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px);
}
.top-title { font-size: 16px; font-weight: 650; letter-spacing: -.01em; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { display: flex; align-items: center; gap: 5px; }
.mobile-only { display: none; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; padding: 0 19px 5px; max-width: 1288px; margin: 0 auto; }
.tabs { padding: 0 19px 6px; max-width: 1288px; margin: 0 auto; }
.tabs-seg button { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 9px; }
.tabs-seg .ic { width: 14px; height: 14px; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 3px 0 9.5px; border-radius: 999px; background: var(--soft); font-size: 11.5px; max-width: 100%; }
.chip-dim { color: var(--ink-2); }
.chip b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }
.chip-x { width: 19px; height: 19px; border-radius: 50%; border: 0; background: transparent; display: grid; place-items: center; color: var(--ink-2); }
.chip-x:hover { background: var(--soft-2); color: var(--ink); }
.chip-x .ic { width: 10.5px; height: 10.5px; }
#content { max-width: 1288px; margin: 0 auto; padding: 6.5px 19px 57.5px; }
.view { display: flex; flex-direction: column; gap: 13px; }

/* ---------------------------------------------------------------- cartões e estados */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14.5px; padding: 14.5px 16px; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6.5px 8px; margin-bottom: 9.5px; min-height: 25.5px; }
.card-head h2 { white-space: nowrap; }
.card-head h2 { font-size: 13.5px; font-weight: 650; display: flex; align-items: center; gap: 3px; }
.card-head h2 .muted { font-weight: 450; }

.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 25.5px 9.5px; color: var(--ink-3); text-align: center; }
.empty .ic { width: 17.5px; height: 17.5px; }
.empty.err { color: var(--bad-ink); }
.note { display: flex; align-items: center; gap: 8px; padding: 8px 11px; border-radius: 11px; background: var(--soft); font-size: 12px; color: var(--ink-2); }
.note .ic { width: 13.5px; height: 13.5px; }
.note.warn { background: var(--warn-soft); color: var(--ink); }
.note.warn .ic { color: var(--warn-ink); }
.note.bad { background: var(--bad-soft); color: var(--ink); }
.note.bad .ic { color: var(--bad-ink); }
.note.act span { flex: 1; }
.skel-wrap { display: flex; flex-direction: column; gap: 8px; }
.skel { position: relative; overflow: hidden; height: 35px; border-radius: 9.5px; background: var(--soft); }
.kpi-skel .skel { height: 120px; border-radius: 14.5px; }
.chart-skel .skel { height: 240px; border-radius: 14.5px; }
.card-skel .skel:first-child { height: 96px; border-radius: 14.5px; }
.rows .skel { height: 32px; }
@keyframes shimmer { to { background-position: -200% 0; } }

.dot { width: 6.5px; height: 6.5px; border-radius: 50%; display: inline-block; flex: none; background: var(--ink-3); }
.dot.good { background: var(--good); } .dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); } .dot.run { background: var(--accent); }
.dot.off { background: transparent; box-shadow: inset 0 0 0 2px var(--ink-3); }
.status { display: inline-flex; align-items: center; gap: 5.5px; font-size: 11.5px; font-weight: 500; white-space: nowrap; }
.status i { width: 6.5px; height: 6.5px; border-radius: 50%; background: var(--ink-3); flex: none; }
.status.good i { background: var(--good); } .status.warn i { background: var(--warn); } .status.bad i { background: var(--bad); }
.status.run i { background: var(--accent); animation: blink 1.2s ease-in-out infinite; }
.status.off i { background: transparent; box-shadow: inset 0 0 0 2px var(--ink-3); }
@keyframes blink { 50% { opacity: .25; } }
.tag { display: inline-flex; align-items: center; gap: 4px; height: 19px; padding: 0 7px; border-radius: 999px; background: var(--soft); font-size: 11px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.tag .ic { width: 10.5px; height: 10.5px; }
.tag.good { background: var(--good-soft); color: var(--good-ink); }
.tag.warn { background: var(--warn-soft); color: var(--warn-ink); }
.tag.bad { background: var(--bad-soft); color: var(--bad-ink); }
.badge { display: inline-flex; align-items: center; gap: 3px; height: 21px; padding: 0 8px 0 5.5px; border-radius: 999px; background: var(--primary); color: var(--on-primary); font-size: 11px; font-weight: 600; white-space: nowrap; }
.badge .ic { width: 11px; height: 11px; stroke-width: 2.4; }
.avatar { width: 29px; height: 29px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; background: var(--soft-2); color: var(--ink); font-weight: 650; font-size: 11.5px; position: relative; }
.avatar.sm { width: 24px; height: 24px; font-size: 10.5px; }
.avatar.xs { width: 19px; height: 19px; font-size: 9px; }
.avatar.live::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; border-radius: 50%; background: var(--good); border: 2px solid var(--card); }
.key { width: 8px; height: 8px; border-radius: 2.5px; display: inline-block; flex: none; }
.s1 { background: var(--s1); fill: var(--s1); } .s2 { background: var(--s2); fill: var(--s2); } .s3 { background: var(--s3); fill: var(--s3); } .s4 { background: var(--s4); fill: var(--s4); }
.st-good { background: var(--good); fill: var(--good); } .st-warn { background: var(--warn); fill: var(--warn); } .st-bad { background: var(--bad); fill: var(--bad); } .st-run { background: var(--accent); fill: var(--accent); }
.key.hatch { background: repeating-linear-gradient(45deg, var(--line) 0 2px, transparent 2px 3px); box-shadow: inset 0 0 0 1px var(--line); }
.bar { display: block; height: 5px; border-radius: 2.5px; background: var(--soft); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 2.5px; background: var(--s1); }
.meter { display: block; height: 5px; border-radius: 2.5px; background: var(--soft); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 2.5px; }
.meter.big { height: 8px; border-radius: 4px; }
.meter.good > span { background: var(--good); } .meter.warn > span { background: var(--warn); } .meter.bad > span { background: var(--bad); }

/* ---------------------------------------------------------------- painel */
.beacon { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); flex: none; position: relative; }
.beacon.on { background: var(--good); }
.beacon.on::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--good); opacity: 0; animation: radar 1.8s ease-out infinite; }
.beacon.lg { width: 11px; height: 11px; }
@keyframes radar { 0% { transform: scale(.6); opacity: .8; } 100% { transform: scale(2); opacity: 0; } }

.kpis { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: 14.5px; background: var(--card); }
.kpi { display: flex; flex-direction: column; gap: 5px; padding: 14.5px 16px; min-width: 0; }
.kpi + .kpi { border-left: 1px solid var(--line-2); }
.kpi-label { font-size: 11.5px; color: var(--ink-2); font-weight: 500; display: inline-flex; align-items: center; gap: 5px; }
.info { width: 13px; height: 13px; border-radius: 50%; border: 1px solid var(--ink-3); color: var(--ink-3); font-size: 9px; font-weight: 700; display: inline-grid; place-items: center; font-style: italic; font-family: Georgia, serif; cursor: help; }
.hero-num { font-size: 43px; line-height: 1; font-weight: 600; letter-spacing: -.03em; font-feature-settings: "tnum" 0; }
.kpi-num { font-size: 25px; line-height: 1.1; font-weight: 600; letter-spacing: -.02em; }
.kpi-foot { display: flex; flex-wrap: wrap; gap: 3px 9.5px; font-size: 11.5px; margin-top: auto; }
.mini { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; padding: 2px 5px 2px 0; border-radius: 5px; font-size: 11.5px; font-weight: 550; color: var(--ink); }
.mini:hover { background: var(--hover); }
.compo { display: flex; gap: 2px; height: 8px; border-radius: 4px; overflow: hidden; margin: 6.5px 0 3px; background: var(--soft); }
.compo-seg { min-width: 3px; flex-basis: 0; }
.compo-legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 3px 11px; font-size: 11.5px; }
.compo-legend li { display: flex; align-items: center; gap: 5px; min-width: 0; }
.compo-legend span { color: var(--ink-2); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compo-legend b { font-weight: 600; }

.chart { position: relative; min-height: 120px; }
.chart-svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.chart-svg:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 5px; }
.chart-svg .grid { stroke: var(--line-2); stroke-width: 1; }
.chart-svg .axis { stroke: var(--line); stroke-width: 1; }
.chart-svg .tick { fill: var(--ink-3); font-size: 10px; font-family: var(--font); }
.chart-svg .cursor { fill: var(--hover); }
.chart-svg .hatch-bg { fill: var(--card); }
.chart-svg .hatch-line { stroke: var(--line); stroke-width: 2; }
.chart-svg .partial .mark { opacity: .55; }
.legend { display: flex; flex-wrap: wrap; gap: 5px 13px; margin-top: 8px; font-size: 11px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 5.5px; }
.chart-table { margin-top: 11px; border-top: 1px solid var(--line-2); padding-top: 6.5px; }
.chart-table .scroll { max-height: 240px; overflow: auto; }

.tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.tbl th { text-align: left; font-weight: 500; font-size: 11px; color: var(--ink-3); padding: 8px 9.5px; white-space: nowrap; position: sticky; top: 0; background: var(--card); }
.tbl td { padding: 8px 9.5px; border-top: 1px solid var(--line-2); vertical-align: middle; }
.tbl .num { text-align: right; }
.tbl.compact th, .tbl.compact td { padding: 5px 8px; }

.rank { list-style: none; margin: 0 -6.5px; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.rank-row { width: 100%; display: flex; align-items: center; gap: 9.5px; padding: 7px 8px; border: 0; background: transparent; border-radius: 9.5px; text-align: left; }
.rank-row:hover { background: var(--hover); }
.rank-ic { width: 24px; height: 24px; border-radius: 7px; background: var(--soft); display: grid; place-items: center; flex: none; color: var(--ink-2); }
.rank-ic .ic { width: 13px; height: 13px; }
.rank-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rank-top { display: flex; justify-content: space-between; gap: 8px; }
.rank-name { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-top b { font-weight: 600; }
.rank-sub { font-size: 11px; color: var(--ink-3); }
.rank-act { width: 13px; height: 13px; color: var(--ink-3); opacity: 0; transition: opacity .15s; }
.rank-row:hover .rank-act, .rank-row:focus-visible .rank-act { opacity: 1; }
.lims { display: flex; flex-direction: column; gap: 2px; margin: 0 -6.5px; }
.lim { display: flex; align-items: center; gap: 9.5px; padding: 8px; border-radius: 9.5px; }
.lim:hover { background: var(--hover); }
.lim-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.lim-top { display: flex; justify-content: space-between; gap: 8px; font-weight: 550; }
.lim-top small { color: var(--ink-3); font-weight: 450; }
.lim-top b { font-weight: 600; white-space: nowrap; }
.lim-sub { font-size: 11px; color: var(--ink-3); }
.prov-mark { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; flex: none; font-weight: 700; font-size: 11.5px; background: var(--soft-2); color: var(--ink); }

.prov-mark.lg { width: 32px; height: 32px; border-radius: 9.5px; font-size: 14.5px; }

/* ---------------------------------------------------------------- ao vivo */
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat small { font-size: 11px; }
.stat .kpi-num { font-size: 21.5px; }
.stat .bad-ink { color: var(--bad-ink); }
.count-pill { min-width: 16px; height: 16px; padding: 0 5px; border-radius: 8px; background: var(--soft-2); font-size: 11px; display: inline-grid; place-items: center; margin-left: 3px; }
.timer { font-variant-numeric: tabular-nums; font-weight: 600; }
.typing { display: inline-flex; gap: 2.5px; }
.typing i { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); animation: typing 1.2s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-2px); } }
@keyframes arrive { 0% { background: var(--accent-soft); } 100% { background: transparent; } }

/* ---------------------------------------------------------------- atividade */
.act-bar { display: flex; align-items: center; gap: 11px; }
.act-bar .search-wrap { flex: 0 1 336px; }
.acts th:first-child, .acts td:first-child { padding-left: 16px; }
.acts th:last-child, .acts td:last-child { padding-right: 16px; }
.acts tbody tr { cursor: pointer; transition: background .1s; }
.acts tbody tr:hover, .acts tbody tr:focus-visible { background: var(--hover); outline: none; }
.acts td { white-space: nowrap; }
.c-when span, .c-when small { display: block; }
.c-when small, .two small { color: var(--ink-3); font-size: 11px; display: block; }
.who-cell { display: flex; align-items: center; gap: 8px; }
.two { display: flex; flex-direction: column; min-width: 0; }
.two > span { font-weight: 550; }
.c-tok, .c-time { font-weight: 550; }
.more { display: flex; justify-content: center; padding: 11px; }
.more:empty { display: none; }

/* gaveta: detalhes */
.flow { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 9.5px; padding: 11px 13px; border-radius: 13px; background: var(--soft); }
.flow > div { display: flex; flex-direction: column; min-width: 0; }
.flow small { font-size: 11px; color: var(--ink-3); }
.flow b { font-size: 14.5px; font-weight: 650; overflow-wrap: anywhere; }
.flow-arrow { color: var(--ink-3); width: 16px; height: 16px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 14.5px; margin: 0; }
.fact { min-width: 0; }
.fact dt { font-size: 11px; color: var(--ink-3); }
.fact dd { margin: 2px 0 0; font-weight: 550; overflow-wrap: anywhere; }
.id-row { display: flex; flex-wrap: wrap; gap: 6.5px; }
.id-chip { display: inline-flex; align-items: center; gap: 6.5px; height: 27px; padding: 0 9.5px; border-radius: 8px; border: 1px solid var(--line); background: transparent; font-size: 11px; }
.id-chip small { color: var(--ink-3); }
.id-chip .ic { width: 11px; height: 11px; color: var(--ink-3); }
.id-chip:hover { background: var(--hover); }
.drawer-actions { display: flex; flex-wrap: wrap; gap: 6.5px; padding-top: 3px; }
.sec { font-size: 11.5px; font-weight: 650; color: var(--ink-2); margin-bottom: 6.5px; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6.5px; }
.tiles > div { padding: 9.5px 11px; border-radius: 11px; background: var(--soft); display: flex; flex-direction: column; gap: 2px; }
.tiles small { font-size: 11px; color: var(--ink-2); }
.tiles b { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }

.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.timeline li { display: grid; grid-template-columns: 19px minmax(0, 1fr); gap: 9.5px; padding: 6.5px 0; position: relative; align-items: start; }
.timeline li > .dot { margin: 5px auto 0; }
.timeline li:not(:last-child)::before { content: ""; position: absolute; left: 9px; top: 24px; bottom: -5px; width: 1px; background: var(--line); }
.timeline li > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.timeline small { color: var(--ink-3); font-size: 11px; }
.timeline b { font-weight: 600; }

/* ---------------------------------------------------------------- equipe */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 256px), 1fr)); gap: 13px; }
.person { display: flex; flex-direction: column; gap: 9.5px; }
.person-head { display: flex; align-items: center; gap: 9.5px; border: 0; background: none; padding: 0; text-align: left; border-radius: 9.5px; }
.person-head:hover b { text-decoration: underline; text-underline-offset: 3px; }
.person-id { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.person-id b { font-weight: 650; font-size: 13.5px; }
.person-id small { color: var(--ink-3); font-size: 11px; }

.devs { list-style: none; margin: 0 -6.5px; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.dev { width: 100%; display: flex; align-items: center; gap: 8px; padding: 6.5px; border: 0; background: transparent; border-radius: 8px; text-align: left; font-size: 12px; }
.dev:hover { background: var(--hover); }
.dev-ic { width: 13px; height: 13px; color: var(--ink-3); }
.dev-name { flex: 1; min-width: 0; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dev-ago { flex: none; }
.fleet-log { margin: 5px 0; padding: 8px; border-radius: 8px; background: var(--soft); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 224px; overflow: auto; }

/* ---------------------------------------------------------------- contas */

.accts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 8px; }
.acct { display: flex; flex-direction: column; gap: 9.5px; padding: 11px; border-radius: 13px; border: 1px solid var(--line); }
.acct.active { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.acct.expired { background: var(--soft); border-style: dashed; }
.acct-head { display: flex; align-items: center; gap: 8px; }
.acct-id { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.acct-id b { font-weight: 650; display: flex; align-items: center; gap: 5px; }
.acct-id small { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan { font-size: 10px; font-weight: 600; padding: 1px 5.5px; border-radius: 5px; background: var(--soft); color: var(--ink-2); }
.wins { display: flex; flex-direction: column; gap: 8px; }
.win { display: flex; flex-direction: column; gap: 4px; }
.win-top { display: flex; justify-content: space-between; gap: 6.5px; font-size: 11.5px; }
.win-top b { font-weight: 600; }
.win small { font-size: 11px; }

.credits { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 13px; }
.cred-main, .cred-chart { padding: 13px 14.5px; border-radius: 13px; background: var(--soft); display: flex; flex-direction: column; gap: 6.5px; }
.cred-sub { display: flex; justify-content: space-between; align-items: center; gap: 6.5px; flex-wrap: wrap; font-size: 11.5px; }
.spark { display: flex; align-items: flex-end; gap: 2.5px; height: 67px; margin-top: 3px; }
.spark span { flex: 1; min-width: 2px; border-radius: 2.5px 2.5px 0 0; background: color-mix(in srgb, var(--s1) 45%, var(--soft)); transition: background .1s; }
.spark span.now, .spark span:hover { background: var(--s1); }
.spark-axis { font-size: 10.5px; }
.swap { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 9.5px; }
.swap-row { display: flex; flex-direction: column; gap: 5px; padding: 9.5px 11px; border-radius: 11px; background: var(--soft); min-width: 0; }
.swap-row.to { background: var(--card); box-shadow: inset 0 0 0 1.5px var(--ink); }
.swap-row b { font-size: 13.5px; }
.connect { display: flex; flex-direction: column; gap: 11px; }
.code { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 51px; border-radius: 13px; border: 1.5px dashed var(--line); background: var(--soft); font-family: var(--mono); font-size: 23.5px; font-weight: 500; letter-spacing: .08em; }
.code .ic { width: 14.5px; height: 14.5px; color: var(--ink-3); }
.code:hover { border-color: var(--ink-3); }

/* ---------------------------------------------------------------- exportar e dados */
.export-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.export-sum > .muted { margin-left: auto; }
.choices { display: flex; flex-direction: column; gap: 6.5px; }
.choice { display: flex; align-items: center; gap: 9.5px; padding: 9.5px 11px; border-radius: 11px; border: 1px solid var(--line); background: transparent; text-align: left; transition: border-color .12s, background .12s; }
.choice:hover { background: var(--hover); }
.choice[aria-checked="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.choice-ic { width: 29px; height: 29px; border-radius: 8px; background: var(--soft); display: grid; place-items: center; flex: none; }
.choice-text { flex: 1; display: flex; flex-direction: column; }
.choice-text b { font-weight: 600; }
.choice-text small { color: var(--ink-3); font-size: 11px; }
.radio { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--ink-3); flex: none; display: grid; place-items: center; }
[aria-checked="true"] > .radio { border-color: var(--ink); }
[aria-checked="true"] > .radio::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.src-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.src-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 11px; border-radius: 9.5px; background: var(--soft); }
.src-list li > span { display: flex; flex-direction: column; }
.src-list small { font-size: 11px; }
.bullets { margin: 0; padding-left: 14.5px; color: var(--ink-2); font-size: 11.5px; display: flex; flex-direction: column; gap: 3px; }
.defs { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.defs dt { font-weight: 600; font-size: 11.5px; text-transform: capitalize; }
.defs dd { margin: 0; color: var(--ink-2); font-size: 11.5px; }

/* calendário */
.cal { width: 240px; max-width: 100%; padding: 5px; display: flex; flex-direction: column; gap: 5px; }
.pop.sheet .cal { width: 100%; }
.cal-head { display: flex; align-items: center; justify-content: space-between; }
.cal-head b { font-weight: 600; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px 0; }
.cal-w { text-align: center; font-size: 10.5px; color: var(--ink-3); padding: 3px 0; }
.cal-day { height: 29px; border: 0; background: transparent; font-size: 12px; border-radius: 8px; font-variant-numeric: tabular-nums; }
.cal-day:hover:not(:disabled) { background: var(--hover); }
.cal-day:disabled { color: var(--ink-3); opacity: .45; }
.cal-day.today { font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.cal-day.in { background: var(--soft); border-radius: 0; }
.cal-day.start, .cal-day.end { background: var(--primary); color: var(--on-primary); }
.cal-day.start:hover, .cal-day.end:hover { background: var(--primary); }
.cal-foot { display: flex; align-items: center; justify-content: space-between; gap: 6.5px; padding-top: 5px; border-top: 1px solid var(--line-2); font-size: 11.5px; }

/* ---------------------------------------------------------------- responsivo */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi.hero { grid-column: 1 / -1; border-bottom: 1px solid var(--line-2); }
  .kpi.hero + .kpi { border-left: 0; }
}
@media (max-width: 760px) {
  .side { transform: translateX(-100%); width: 224px; box-shadow: var(--shadow); }
  .app.side-open .side { transform: none; }
  .app.collapsed { --side-w: 208px; }
  .app.collapsed .brand-name, .app.collapsed .nav-label, .app.collapsed .me-name, .app.collapsed .me-more { display: revert; }
  .app.collapsed .brand { display: flex; }
  .app.collapsed .side-top { justify-content: space-between; padding: 0 0 0 5px; }
  .app.collapsed .nav a { justify-content: flex-start; padding: 0 8px; }
  .app.collapsed .me { justify-content: flex-start; padding: 0 6.5px; }
  .main { margin-left: 0; }
  .mobile-only { display: inline-grid; }
  .top { padding: 0 9.5px 0 6.5px; }
  .chips { padding: 0 13px 5px; }
  #content { padding: 3px 13px 51px; }

  .credits { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 13.5px; }
  .hide-xs { display: none; }
  .top { height: 45px; gap: 3px; }
  .top-title { font-size: 15.5px; }
  .top-actions { gap: 3px; }
  .btn.chip-btn { padding: 0 8px; }
  #content { padding: 3px 9.5px 45px; }
  .view { gap: 9.5px; }
  .card { padding: 13px; border-radius: 13px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); border-radius: 13px; }
  .kpi { padding: 11px 13px; }
  .kpi + .kpi { border-left: 0; }
  .kpi:nth-child(3) { border-left: 1px solid var(--line-2); }
  .kpi:nth-child(4) { grid-column: 1 / -1; border-top: 1px solid var(--line-2); }
  .kpi:nth-child(2), .kpi:nth-child(3) { border-top: 0; }
  .hero-num { font-size: 38px; }
  .kpi-num { font-size: 21.5px; }
  .compo-legend { gap: 3px 8px; font-size: 11px; }
  .stat .kpi-num { font-size: 18px; }
  .act-bar .search-wrap { flex: 1; }
  /* atividade: linhas viram itens */
  .drawer { width: 100vw; height: 92vh; max-height: 92vh; margin: auto 0 0 0; border-radius: 17.5px 17.5px 0 0; }
  .drawer[open] { animation: sheet-up .22s ease-out; }
  .drawer-head { position: relative; padding: 17.5px 13px 6.5px 16px; }
  .drawer-head .grabber { display: block; position: absolute; top: 6.5px; left: 50%; margin-left: -14.5px; }
  .drawer-body { padding: 3px 16px calc(19px + env(safe-area-inset-bottom, 0px)); }
  .modal { width: 100vw; max-width: 100vw; margin: auto 0 0 0; border-radius: 17.5px 17.5px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .modal[open] { animation: sheet-up .22s ease-out; }
  .modal-foot .btn { flex: 1; }
  .tiles b { font-size: 15.5px; }
  .flow { grid-template-columns: minmax(0, 1fr); }
  .flow-arrow { transform: rotate(90deg); }
  .swap { grid-template-columns: minmax(0, 1fr); }
  .swap .flow-arrow { justify-self: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------------------------------------------------------------- movimento (motion.js)
   Barras crescem a partir da base; o esqueleto brilha por transform; o gráfico realça a coluna sob o cursor. */
.compo, .bar > span, .meter > span { transform-origin: left center; }
.spark span { transform-origin: 50% 100%; }
.chart-svg .col { transform-box: fill-box; transform-origin: 50% 100%; transition: opacity .15s; }
.rank-row, .lim, .pc-row, .mini, .lv-person { transition: background .15s; }
.chart-svg.hl .col:not(.on) { opacity: .4; }
.skel { --sheen: rgb(255 255 255 / .7); }
.skel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, var(--sheen), transparent); transform: translateX(-100%); animation: sheen 1.3s ease-in-out infinite; }
.skel:nth-child(2)::after { animation-delay: .1s; } .skel:nth-child(3)::after { animation-delay: .2s; } .skel:nth-child(n+4)::after { animation-delay: .3s; }
@keyframes sheen { to { transform: translateX(100%); } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .skel { --sheen: rgb(255 255 255 / .05); } }
:root[data-theme="dark"] .skel { --sheen: rgb(255 255 255 / .05); }

.kpi-foot .mini { font-weight: 500; color: var(--ink-2); }
.kpi-foot .mini b { color: var(--ink); font-weight: 600; }

.login-demo { display: flex; align-items: center; gap: 6.5px; padding: 8px 11px; border-radius: 9.5px; background: var(--soft); color: var(--ink-2); font-size: 11.5px; }
.login-demo .ic { width: 13px; height: 13px; color: var(--good); }

/* ================================================================ v3: provedores, rotas, exportação, login */
.self-start { align-self: flex-start; }
.pad { padding: 8px; }
.tag.tiny { height: 14.5px; padding: 0 5px; font-size: 9.5px; margin-left: 5px; vertical-align: 1px; }
.stack.tight { gap: 6.5px; }
.toast-act { margin-left: 5px; border: 0; background: color-mix(in srgb, var(--on-primary) 16%, transparent); color: var(--on-primary); font-weight: 650; height: 22.5px; padding: 0 9.5px; border-radius: 999px; }
.toast-act:hover { background: color-mix(in srgb, var(--on-primary) 26%, transparent); }
.modal.wide { width: min(608px, calc(100vw - 25.5px)); }

/* marcas */
.prov-mark.xs { width: 16px; height: 16px; border-radius: 5px; font-size: 9.5px; }
.prov-mark.sm { width: 22.5px; height: 22.5px; border-radius: 6.5px; font-size: 11px; }
.prov-mark.logo { background: var(--soft-2); color: var(--ink); }
.prov-mark.logo svg { width: 64%; height: 64%; display: block; }

/* provedores */

.acct-foot { display: flex; flex-wrap: wrap; gap: 3px 9.5px; font-size: 11px; color: var(--ink-2); padding-top: 8px; border-top: 1px solid var(--line-2); margin-top: auto; }
.acct-foot b { color: var(--ink); font-weight: 600; }
.acct.faded { background: var(--soft); border-style: dashed; }
.credits.single { grid-template-columns: minmax(0, 1fr); }
.prov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 8px; }
.prov-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 6.5px; padding: 11px; border-radius: 13px; border: 1px solid var(--line); background: transparent; text-align: left; }
.prov-tile:hover { background: var(--hover); border-color: var(--ink-3); }
.prov-tile small { font-size: 11px; line-height: 1.4; }
.wait-line { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--ink-2); font-size: 12px; }
.wait-line.bad { color: var(--bad-ink); }
.spin { width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--soft-2); border-top-color: var(--ink); animation: spin .8s linear infinite; }

/* ajustes: linhas de opção, chips de escolha, ajuste fino, ordem */
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 11px; }
.set-row > div { display: flex; flex-direction: column; min-width: 0; }
.set-row b { font-weight: 600; }
.set-row small { font-size: 11px; }
.set-block { display: flex; flex-direction: column; gap: 6.5px; }
.set-label { font-size: 11.5px; color: var(--ink-2); font-weight: 500; }
.dim { opacity: .45; pointer-events: none; }
.picks { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.pick { display: inline-flex; align-items: center; gap: 5px; height: 27px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 12px; font-weight: 550; color: var(--ink); white-space: nowrap; }
.pick:hover:not(:disabled) { background: var(--soft); }
.pick[aria-checked="true"], .pick[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.pick .ic { width: 12px; height: 12px; }
.stepper { display: inline-flex; align-items: center; height: 29px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); overflow: hidden; }
.step-btn { width: 29px; height: 100%; border: 0; background: transparent; display: grid; place-items: center; color: var(--ink-2); }
.step-btn:hover:not(:disabled) { background: var(--hover); color: var(--ink); }
.step-btn:disabled { opacity: .35; }
.step-btn .ic { width: 13px; height: 13px; }
.step-in { width: 67px; height: 100%; border: 0; background: transparent; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.step-in:focus-visible { outline: none; background: var(--soft); }
.step-fix { color: var(--ink-3); font-size: 11px; padding: 0 2px; }
.order { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.order li { display: flex; align-items: center; gap: 8px; padding: 5px 5px 5px 8px; border-radius: 9.5px; background: var(--soft); min-height: 35px; }
.order-n { width: 17.5px; height: 17.5px; border-radius: 50%; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); display: inline-grid; place-items: center; font-size: 10.5px; font-weight: 650; flex: none; }
.order-n.sm { width: 14.5px; height: 14.5px; font-size: 9.5px; margin-left: 5px; background: var(--primary); color: var(--on-primary); box-shadow: none; }
.order-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-label b { font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; padding: 5px; border: 1px solid var(--line); border-radius: 11px; min-height: 38.5px; }
.tag-in { flex: 1; min-width: 112px; height: 25.5px; border: 0; background: transparent; padding: 0 5px; }
.tag-in:focus-visible { outline: none; }

/* rotas */

.model-btn { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; height: 38.5px; padding: 0 9.5px 0 6.5px; border-radius: 9.5px; border: 1px solid var(--line); background: var(--card); text-align: left; }
.model-btn:hover:not(:disabled) { background: var(--soft); }
.model-btn:disabled { cursor: default; opacity: .75; }
.model-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.model-txt b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.model-txt small { font-size: 11px; color: var(--ink-3); }

.route-edit { display: flex; flex-direction: column; gap: 17.5px; }
.edit-sec { display: flex; flex-direction: column; gap: 9.5px; }
.edit-sec + .edit-sec { padding-top: 14.5px; border-top: 1px solid var(--line-2); }
.edit-sec-head { display: flex; flex-direction: column; gap: 2px; }
.edit-sec-head h3 { font-size: 12.5px; font-weight: 650; }
.edit-sec-head small { font-size: 11px; }
.model-card { display: flex; align-items: center; gap: 9.5px; padding: 9.5px; border-radius: 13px; background: var(--soft); }
.model-card-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.model-card-main b { font-size: 13.5px; font-weight: 650; }
.pick-badges { display: flex; flex-wrap: wrap; gap: 3px; }
.pick-badges .tag { height: 17.5px; font-size: 10.5px; }
.drawer-foot { position: sticky; bottom: calc(-22.5px - env(safe-area-inset-bottom, 0px)); display: flex; justify-content: flex-end; gap: 6.5px; margin: 0 -19px calc(-22.5px - env(safe-area-inset-bottom, 0px)); padding: 9.5px 19px calc(13px + env(safe-area-inset-bottom, 0px)); background: var(--card); border-top: 1px solid var(--line-2); }
.eps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.eps li { display: flex; align-items: center; gap: 6.5px; padding: 3px 5px 3px 3px; border-radius: 9.5px; border: 1px solid var(--line-2); }
.eps li.on { border-color: var(--ink); }
.ep-check { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 5px; border: 0; background: transparent; text-align: left; border-radius: 8px; }
.ep-check:hover { background: var(--hover); }
.ep-main { display: flex; flex-direction: column; min-width: 0; }
.ep-main b { font-weight: 600; display: flex; align-items: center; }
.ep-main small { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flow-acct { display: inline-flex; align-items: center; gap: 5px; margin-top: 3px; }

/* seletor de modelo */

.pick-filters { display: flex; gap: 5px; flex-wrap: wrap; }
.pick-filters .pick { height: 24px; font-size: 11px; }
.pick-list { display: flex; flex-direction: column; gap: 2px; max-height: 46vh; overflow-y: auto; margin: 0 -6.5px; padding: 0 2px; }
.pick-row { display: flex; align-items: center; gap: 9.5px; padding: 8px; border: 0; background: transparent; border-radius: 9.5px; text-align: left; width: 100%; }
.pick-row:hover, .pick-row:focus-visible { background: var(--hover); }
.pick-row[aria-selected="true"] { background: var(--soft); }
.pick-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pick-main b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-main small { font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-row .pick-badges { justify-content: flex-end; flex: none; max-width: 50%; }

/* exportação */
.progress-box { display: flex; flex-direction: column; gap: 8px; padding: 13px; border-radius: 13px; background: var(--soft); }
.meter.run > span { background: var(--accent); transition: width .6s ease; background-image: linear-gradient(90deg, transparent, rgb(255 255 255 / .25), transparent); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; }
.done-box { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 5px; padding: 16px 9.5px; }
.done-ic { width: 38.5px; height: 38.5px; border-radius: 50%; display: grid; place-items: center; background: var(--good-soft); color: var(--good-ink); margin-bottom: 3px; }
.done-box.bad .done-ic { background: var(--bad-soft); color: var(--bad-ink); }
.done-ic .ic { width: 19px; height: 19px; stroke-width: 2.4; }
.done-box b { font-size: 14.5px; }
.recent { display: flex; flex-direction: column; gap: 6.5px; }

/* login */
.login-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.login-caps { display: flex; align-items: center; gap: 6.5px; margin-top: -5px; padding: 0 3px; font-size: 11.5px; color: var(--warn-ink); }
.login-caps .ic { width: 12px; height: 12px; }
.login-error { display: flex; align-items: center; gap: 6.5px; }
.login-error .ic { width: 13px; height: 13px; flex: none; }

@media (max-width: 640px) {
  .pick-row { flex-wrap: wrap; }
  .pick-row .pick-badges { max-width: 100%; width: 100%; justify-content: flex-start; padding-left: 32px; }
  .pick-list { max-height: 52vh; }
  .drawer-foot { margin: 0 -16px calc(-19px - env(safe-area-inset-bottom, 0px)); padding: 9.5px 16px calc(11px + env(safe-area-inset-bottom, 0px)); bottom: calc(-19px - env(safe-area-inset-bottom, 0px)); }
  .drawer-foot .btn { flex: 1; }
  .set-row { align-items: flex-start; }
}

.seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg button { white-space: nowrap; flex: none; }

/* ---------- peças novas */

.note.slim { padding: 5.5px 9.5px; font-size: 11.5px; border-radius: 9.5px; }
.kpi-line { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; min-width: 0; }
.delta { font-size: 11px; font-weight: 600; color: var(--ink-2); white-space: nowrap; cursor: help; }
.delta.up { color: var(--ink-2); } .delta.down { color: var(--ink-2); } .delta.flat { color: var(--ink-3); }
.kpi-foot b { color: var(--ink); font-weight: 600; }
.chart-area { position: relative; height: 200px; min-height: 0; }
.chart-area > .chart, .chart-area > .chart-table { position: absolute; inset: 0; min-height: 0; }
.chart-area > .chart-table { overflow: auto; margin: 0; padding: 0; border: 0; }
.chart-svg { height: 100%; }
.lim-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar.bad { background: var(--bad-soft); color: var(--bad-ink); }
.tag-btn { border: 0; cursor: pointer; }
.tag-btn:hover { background: var(--soft-2); color: var(--ink); }
.tag-btn .dd-chev { width: 10.5px; height: 10.5px; }
.choices.compact { gap: 5px; }
.choices.compact .choice { padding: 7px 9.5px; }
.choices.compact .choice-ic { width: 25.5px; height: 25.5px; }
.score { min-width: 27px; height: 19px; padding: 0 5.5px; border-radius: 6.5px; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--soft); color: var(--ink-2); font-variant-numeric: tabular-nums; cursor: help; }
.score.good { background: var(--good-soft); color: var(--good-ink); }
.score.low { color: var(--ink-3); }
.eps li.weak { opacity: .62; }
.ep-main b { gap: 3px; flex-wrap: wrap; }
.ep-main b .tag.tiny { margin-left: 2px; }
.row.tight { gap: 3px; }

/* modo Claude por seletor */
.m-routed { --mode: var(--accent); --mode-soft: var(--accent-soft); }
.m-observed { --mode: #d95926; --mode-soft: color-mix(in srgb, #d95926 13%, var(--card)); }
.m-direct { --mode: var(--ink-3); --mode-soft: var(--soft); }

.choice-ic.m-routed, .choice-ic.m-observed, .choice-ic.m-direct { background: var(--mode-soft); }

/* detalhe da chamada */
.req-tabs { position: sticky; top: -3px; z-index: 2; background: var(--card); padding: 2px 0 5px; margin-top: -3px; }
.speed { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6.5px; }
.speed > div { display: flex; flex-direction: column; gap: 2px; padding: 8px 9.5px; border-radius: 11px; background: var(--soft); min-width: 0; }
.speed small { font-size: 11px; color: var(--ink-2); }
.speed b { font-size: 15.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wf { display: flex; flex-direction: column; gap: 3px; }
.wf-track { position: relative; height: 11px; border-radius: 5.5px; background: var(--soft); }
.wf-wait { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5.5px 0 0 5.5px; background: repeating-linear-gradient(45deg, var(--soft-2) 0 2.5px, transparent 2.5px 5px); }
.wf-stream { position: absolute; top: 0; bottom: 0; border-radius: 5.5px; background: color-mix(in srgb, var(--s1) 70%, transparent); }
.wf-mark { position: absolute; top: -2.5px; width: 2px; height: 16px; margin-left: -1px; border-radius: 1px; background: var(--ink); opacity: .55; }
.wf-axis { display: flex; justify-content: space-between; font-size: 10.5px; }
.sec .muted { font-weight: 450; }
p.row .ic { width: 12px; height: 12px; }

/* equipe */
.team-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 19px; padding: 8px 14.5px; border-radius: 13px; background: var(--soft); }
.team-sum > div { display: flex; align-items: baseline; gap: 5px; }
.team-sum b { font-size: 16px; font-weight: 650; letter-spacing: -.01em; }
.team-sum small { color: var(--ink-2); font-size: 11.5px; }
.team-sum .warn b { color: var(--warn-ink); }

.person.idle { opacity: .8; }

/* ---------- celular: tudo empilha e a página rola */
@media (max-width: 760px) {
  .team-sum { gap: 3px 13px; }
}
@media (min-width: 761px) { .pn-body { display: grid; grid-template-columns: minmax(0, 1fr) clamp(224px, 32%, 352px); gap: 13px; } .pn-side { display: flex; flex-direction: column; gap: 13px; min-width: 0; } }

/* ---------- janela inteira (sem rolagem da página) */
@media (min-width: 761px) and (min-height: 420px) {
  html { scrollbar-gutter: auto; height: 100%; }
  body { height: 100%; overflow: hidden; }
  .app { height: 100vh; height: 100dvh; }
  .main { height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
  .top { position: relative; flex: none; }
  .chips { flex: none; width: 100%; max-width: 1760px; padding: 0 16px 5px; }
  #content { flex: 1; min-height: 0; width: 100%; max-width: 1760px; padding: 2px 16px 13px; display: flex; flex-direction: column; container: content / size; }
  .view { --gap: 13px; flex: 1; min-height: 0; gap: var(--gap); overflow: auto; }
  .view > * { flex-shrink: 0; }
  .card { min-height: 0; }
  .fit-card { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
  .fit-card > .card-head { flex: none; }
  .card-scroll { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; }
  .fit-card > .empty { flex: 1; justify-content: center; padding: 9.5px; }

  /* painel: números · gráfico | uso por + limites */
  #v-painel { overflow: hidden; }
  #v-painel > .kpis { flex: none; }
  .pn-body { flex: 1 1 auto; min-height: 0; gap: var(--gap); }
  .pn-side { display: grid; grid-template-rows: minmax(0, 1.15fr) minmax(0, 1fr); gap: var(--gap); min-height: 0; }
  .chart-card { display: flex; flex-direction: column; min-height: 0; }
  .chart-card > .card-head { flex: none; }
  .chart-area { flex: 1; height: auto; min-height: 48px; }
  .legend { flex: none; margin-top: 6.5px; }
  .kpi { padding: 11px 14.5px; gap: 3px; }
  .hero-num { font-size: clamp(27px, 4.2vw, 39.5px); }

  /* ao vivo: cabeça · gráfico · duas filas */

  /* atividade: a tabela rola por dentro, com cabeçalho preso */
  #v-atividade { overflow: hidden; }
  .act-card { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
  .act-list { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; }
  .acts thead th { z-index: 1; box-shadow: inset 0 -1px 0 var(--line-2); }

  /* equipe: resumo fixo · pessoas rolam */
  #v-equipe { overflow: hidden; }
  #v-equipe > .people { flex: 1 1 auto; min-height: 0; overflow: auto; align-content: start; padding: 1px; overscroll-behavior: contain; }

  /* largo: três colunas no painel; colunas extras na equipe */
  @container content (min-width: 1380px) {
    .pn-body { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); }
    .pn-side { display: contents; }
  }
  /* estreito (zoom alto num notebook): o lado vira linha de baixo */
  @container content (max-width: 720px) {
    .pn-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(88px, 1.1fr) minmax(0, 1fr); }
    .pn-side { grid-template-rows: minmax(0, 1fr); grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .kpis { grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); }
    .kpi { padding: 8px 9.5px; }
    .kpi-num { font-size: 20px; }
  }

  /* altura curta: aperta espaços e esconde o que é secundário (dados continuam nas dicas) */
  @container content (max-height: 640px) {
    .view { --gap: 9.5px; }
    .card { padding: 11px 13px; }
    .card-head { margin-bottom: 6.5px; min-height: 24px; }
    .kpi { padding: 8px 13px; }
    .compo-legend { display: none; }
    .compo { margin: 5px 0 0; }
    .hero-num { font-size: clamp(25px, 3.4vw, 34px); }
    .kpi-num { font-size: 21.5px; }
    .rank-row { padding: 5.5px 8px; }
    .lim { padding: 6.5px 8px; }
    .legend { margin-top: 5px; }
    .stat .kpi-num { font-size: 18px; }
    .team-sum { padding: 6.5px 11px; }
    .people { gap: 9.5px; }

    .model-btn { height: 33.5px; }

    .tbl td { padding-top: 6.5px; padding-bottom: 6.5px; }
  }
  @container content (max-height: 500px) {
    .view { --gap: 8px; }
    .card { padding: 8px 11px; border-radius: 11px; }
    .card-head { margin-bottom: 5px; }
    .card-head h2 { font-size: 12.5px; }
    .kpi { padding: 6.5px 9.5px; gap: 2px; }
    .kpi-label { font-size: 11px; }
    .hero-num { font-size: 25px; }
    .kpi-num { font-size: 19px; }
    .kpi-foot { font-size: 11px; }
    .compo { height: 5.5px; }
    .rank-sub, .lim-sub { display: none; }
    .rank-main, .lim-main { gap: 2.5px; }
    .legend { display: none; }

    .team-sum b { font-size: 14.5px; }
    .person { gap: 6.5px; }
    .act-bar .search-wrap.big .search-in { height: 29px; }
  }
}
/* janela baixa: cabeçalho e menu mais compactos */
@media (min-width: 761px) and (max-height: 560px) {
  .top { height: 38.5px; }
  .top-title { font-size: 14.5px; }
  .btn.chip-btn { min-height: 25.5px; }

  .side { padding: 5px; }
  .side-top { height: 30.5px; }
  .nav { margin-top: 3px; }
  .nav a { height: 27px; }
  .me { height: 33.5px; }
}
.login-hint { font-size: 11px; color: var(--ink-3); }

/* ---------- ajustes v4 após o teste nas 16 combinações */
.acc-toggle { display: none; }
.mini-l { color: var(--ink-2); font-weight: 500; }
@media (min-width: 761px) and (min-height: 420px) {
  .kpis { grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); }
  .kpi.hero { grid-column: auto; border-bottom: 0; }
  .kpi.hero + .kpi { border-left: 1px solid var(--line-2); }
  #v-equipe > .people { grid-auto-rows: max-content; }
  .people > .card { min-height: auto; }
  @container content (max-height: 500px) {
    .mini-l { display: none; }
    .kpi-foot { gap: 2px 6.5px; }
  }
}
/* janela larga (zoom 80% num monitor grande): o conteúdo acompanha o topo, sem faixas vazias */
@media (min-width: 761px) and (min-height: 420px) { #content, .chips { max-width: none; } }

.acct-id b { min-width: 0; }
.acct-id b > :first-child { overflow: hidden; text-overflow: ellipsis; }

.acct-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.acct-id .plan { flex: none; }
.pick[aria-checked="true"]:hover:not(:disabled), .pick[aria-pressed="true"]:hover:not(:disabled) { background: var(--primary); opacity: .88; }

.clip { display: grid; gap: 3px; }
.clip-btn { justify-self: start; font-size: 11px; }

/* conversas agrupadas (Atividade e Ao vivo) */

/* pedido → atendido */
.pair { display: inline-flex; align-items: center; gap: 5px; min-width: 0; max-width: 100%; height: 21px; padding: 0 7px 0 3px; border-radius: 6.5px; background: var(--mode-soft); font-size: 11.5px; white-space: nowrap; vertical-align: middle; }
.pair.sm { height: 17.5px; font-size: 11px; gap: 4px; padding: 0 5.5px 0 2.5px; }
.pair .prov-mark.xs { width: 14.5px; height: 14.5px; font-size: 9px; border-radius: 4px; }
.pair-req { color: var(--ink-2); }
.pair-arrow { width: 10.5px; height: 10.5px; color: var(--ink-3); stroke-width: 2; }
.pair-dot { color: var(--ink-3); }
.pair-served { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.pair-n { color: var(--ink-3); font-size: 10px; font-weight: 600; }
.pairs { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 3px 5px; min-width: 0; }
.pair-more { font-size: 11px; font-weight: 600; color: var(--ink-3); cursor: help; }
.m-routed.pair, .m-observed.pair { --mode-soft: var(--soft); }

/* tokens: novos em cima, cache embaixo */
.tok2 { display: inline-flex; flex-direction: column; align-items: flex-end; line-height: 1.25; cursor: help; }
.tok2 b { font-weight: 600; }
.tok2 small { font-size: 10.5px; color: var(--ink-3); font-weight: 450; white-space: nowrap; }

/* o que o turno fez */
.act-line { display: flex; align-items: center; gap: 6.5px; min-width: 0; font-size: 11px; color: var(--ink-2); overflow: hidden; white-space: nowrap; }
.act-line > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.act-line .ic { width: 10.5px; height: 10.5px; flex: none; color: var(--ink-3); }
.act-asked { color: var(--ink); font-weight: 500; flex: 0 1 auto; }
.act-tool { display: inline-flex; align-items: center; gap: 4px; }
.act-tool b { font-weight: 600; color: var(--ink); }
.act-tool .mono { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; font-size: 10.5px; }
.act-said { display: inline-flex; align-items: center; gap: 4px; overflow: hidden; text-overflow: ellipsis; }
.act-line.run { color: var(--accent); font-weight: 500; }
.act-line.bad { color: var(--bad-ink); } .act-line.warn { color: var(--warn-ink); }

/* ---------- Ao vivo */
.lv-head { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 17.5px; align-items: stretch; padding: 11px 14.5px; }
.lv-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; align-items: start; }
.lv-stats .stat { min-width: 0; }
.lv-stats .stat > small { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-stats .kpi-num { font-size: 23.5px; }
.lv-stats .kpi-num small { font-size: 11.5px; font-weight: 500; color: var(--ink-2); letter-spacing: 0; }

.lv-chart { display: flex; flex-direction: column; min-width: 0; border-left: 1px solid var(--line-2); padding-left: 14.5px; }

.lv-chart .chart-area { height: 72px; flex: 1; }

.acts tbody tr.new { animation: arrive 2.4s ease-out; }
@keyframes arrive { 0% { background: var(--accent-soft); } 100% { background: transparent; } }
.timer { font-variant-numeric: tabular-nums; font-weight: 600; }
.typing { display: inline-flex; gap: 2.5px; }
.typing i { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); animation: typing 1.2s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-2px); } }
.count-pill { min-width: 16px; height: 16px; padding: 0 5px; border-radius: 8px; background: var(--soft-2); font-size: 11px; display: inline-grid; place-items: center; margin-left: 3px; }

/* ---------- Atividade */
.act-bar { display: flex; align-items: center; gap: 9.5px; flex-wrap: wrap; }
.act-bar .search-wrap { flex: 1 1 208px; max-width: 336px; }
.act-who { display: inline-flex; align-items: center; gap: 6.5px; font-size: 13.5px; }
.act-who b { font-weight: 650; }
.act-back .ic { width: 13px; height: 13px; }
.acts td { white-space: nowrap; vertical-align: middle; }
.acts th:first-child, .acts td:first-child { padding-left: 16px; }
.acts th:last-child, .acts td:last-child { padding-right: 16px; }
.acts tbody tr { cursor: pointer; transition: background .1s; }
.acts tbody tr:hover, .acts tbody tr:focus-visible { background: var(--hover); outline: none; }
.acts th .info { margin-left: 4px; vertical-align: -2px; }
.two.r { align-items: flex-end; }
.acts.ppl .c-who .two > span { font-weight: 600; }
.acts.ppl .c-pairs { white-space: normal; max-width: 288px; }
.acts.ppl tr.live td:first-child { box-shadow: inset 3px 0 0 var(--good); }
.acts .c-go { width: 22.5px; }
.go-ic { width: 13px; height: 13px; color: var(--ink-3); }
.acts tbody tr:hover .go-ic { color: var(--ink); }

.act-note { padding: 8px 16px 11px; }

/* ---------- detalhe do turno: enviado × cobrado */
.bill { display: flex; flex-direction: column; gap: 8px; padding: 11px 13px; border-radius: 13px; border: 1px solid var(--line); }
.bill .sec { margin: 0; }
.bill-lead { font-size: 12px; line-height: 1.55; color: var(--ink-2); }
.bill-lead b { color: var(--ink); font-weight: 650; }
.bill-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; gap: 2px; background: var(--soft); }
.bill-bar span { min-width: 2.5px; }
.bill-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.bill-list li { display: grid; grid-template-columns: 9.5px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 5.5px 0; border-top: 1px solid var(--line-2); }
.bill-list li:first-child { border-top: 0; }
.bl-label { display: flex; flex-direction: column; font-weight: 550; font-size: 12px; }
.bl-label small { font-size: 11px; color: var(--ink-3); font-weight: 450; }
.bill-list b { font-weight: 600; font-variant-numeric: tabular-nums; }
.bill-cost .key { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.req > .act-line { white-space: normal; font-size: 12px; padding: 0 2px; }
.req > .act-line > span { white-space: normal; }

/* ---------- conteúdo */
.cv-controls { display: flex; align-items: center; justify-content: space-between; gap: 8px 13px; flex-wrap: wrap; }
.cv-lead { font-size: 12px; color: var(--ink-2); line-height: 1.55; }
.cv-lead b { color: var(--ink); }
.cv-meta { display: flex; align-items: center; gap: 6.5px 9.5px; flex-wrap: wrap; }
.cv-meta .row .ic { width: 11px; height: 11px; }
.cv-fixed { display: flex; flex-direction: column; gap: 6.5px; padding: 9.5px 11px; border-radius: 11px; background: var(--soft); }
.cv-sec { display: flex; flex-direction: column; gap: 8px; }
.cv-h { display: flex; align-items: center; gap: 6.5px; font-size: 12.5px; font-weight: 650; }
.cv-h small { font-weight: 450; }
.cv-dot { width: 8px; height: 8px; border-radius: 2.5px; flex: none; }
.cv-dot.sent { background: var(--ink-3); } .cv-dot.resp { background: var(--accent); } .cv-dot.think { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.msgs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.msg { display: flex; flex-direction: column; gap: 6.5px; padding: 9.5px 11px; border-radius: 11px; background: var(--soft); min-width: 0; }
.msg.m-model { background: color-mix(in srgb, var(--accent-soft) 70%, var(--card)); }
.msg.m-tool { background: transparent; border: 1px solid var(--line); }
.msg.hist { opacity: .6; }
.msg-role { font-size: 10.5px; font-weight: 650; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.msg-role small { text-transform: none; letter-spacing: 0; font-weight: 500; }
.cb-text { font-size: 12px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.cb-label { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--ink-2); min-width: 0; flex-wrap: wrap; }
.cb-label .ic { width: 11px; height: 11px; }
.cb-label b { color: var(--ink); }
.cb-target { font-size: 10.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.cb-tool { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.cb-tool pre { margin: 0; padding: 8px 9.5px; border-radius: 8px; background: var(--card); border: 1px solid var(--line-2); font-size: 11px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 208px; overflow: auto; }
.cb-think { display: flex; flex-direction: column; gap: 5px; padding: 8px 9.5px; border-radius: 9.5px; border: 1px dashed var(--line); color: var(--ink-2); }
.cb-think .cb-text { font-style: italic; }
.clip { display: grid; gap: 3px; min-width: 0; }
.clip-btn { justify-self: start; font-size: 11px; padding-left: 0; }

/* ---------- PC: atualizador e modelos */
.dev-sec { display: flex; flex-direction: column; gap: 8px; }
.dev-sec + .dev-sec { padding-top: 11px; border-top: 1px solid var(--line-2); }
.run-sum { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 9.5px; }
.run-strip { display: flex; gap: 2.5px; align-items: flex-end; height: 14.5px; }
.run-strip i { flex: 1; max-width: 8px; height: 100%; border-radius: 2.5px; background: color-mix(in srgb, var(--good) 55%, var(--soft)); }
.run-strip i.bad { background: var(--bad); }
.runs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.run-btn { width: 100%; display: flex; align-items: center; gap: 8px; padding: 5.5px 6.5px; border: 0; border-radius: 8px; background: transparent; text-align: left; font-size: 11.5px; }
.run-btn:hover { background: var(--hover); }
.run-btn > .muted:not(.run-dur) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.run-btn[aria-expanded="true"] .dd-chev { transform: rotate(180deg); }
.run-detail { padding: 3px 6.5px 8px 21px; display: flex; flex-direction: column; gap: 6.5px; }
.run-steps td { font-size: 11px; }
.fleet-log { margin: 0; padding: 8px; border-radius: 8px; background: var(--soft); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 192px; overflow: auto; font-size: 10.5px; }
.mp { display: flex; flex-direction: column; gap: 5px; }
.mp-row { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: center; gap: 9.5px; padding: 5px 6.5px; border-radius: 9.5px; }
.mp-row.own { background: var(--accent-soft); }
.mp-name { display: flex; flex-direction: column; min-width: 0; }
.mp-name b { font-weight: 600; }
.mp-name small { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-row .dd-field { height: 30.5px; }
.issue { display: flex; flex-direction: column; gap: 8px; padding: 11px 13px; border-radius: 13px; border: 1px solid var(--line); }
.issue-pcs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.issue-pcs li { display: flex; align-items: center; gap: 6.5px; font-size: 11.5px; }
.issue-pcs .mono { font-size: 11px; }
.issue-pcs small { margin-left: auto; }

/* ---------- telas inteiras (Ao vivo e Atividade) */
@media (min-width: 761px) and (min-height: 420px) {
  #v-aovivo { display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }

  @container content (max-width: 900px) {
    .lv-head { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .lv-chart { border-left: 0; padding-left: 0; border-top: 1px solid var(--line-2); padding-top: 6.5px; }
    .lv-chart .chart-area { height: 48px; }
  }
  @container content (max-height: 560px) {
    .lv-head { padding: 8px 11px; }
    .lv-stats .kpi-num { font-size: 20px; }
    .lv-chart .chart-area { height: 51px; }
  }
  @container content (max-height: 470px) {
    .lv-chart { display: none; }
    .lv-stats .stat > small { display: none; }
  }

  @container content (max-width: 900px) {   .acts.ppl .c-pairs { max-width: 176px; } }
}
@media (max-width: 760px) {
  .lv-head { grid-template-columns: minmax(0, 1fr); }
  .lv-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lv-stats > :last-child:nth-child(even) { grid-column: 1 / -1; } /* "Usando agora" ocupa a linha toda; se sobra um item sozinho (métricas de 1 coluna ímpares), ele ocupa as duas */
  .lv-chart { border-left: 0; padding-left: 0; }

  .acts thead { display: none; }
  .acts, .acts tbody { display: block; }
  .acts tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 9.5px; padding: 9.5px 13px; border-top: 1px solid var(--line-2); }
  .acts tbody tr:first-child { border-top: 0; }
  .acts td { padding: 0 !important; border: 0; white-space: normal; }
  .acts .c-prompts, .acts .c-go, .acts .c-cost { display: none; }
  .acts.ppl .c-who { grid-column: 1; grid-row: 1; }
  .acts.ppl .c-last { grid-column: 2; grid-row: 1; }
  .acts.ppl .c-pairs { grid-column: 1 / -1; grid-row: 2; }
  .acts.ppl .c-tok { grid-column: 1 / -1; grid-row: 3; text-align: left; }

  .mp-row { grid-template-columns: minmax(0, 1fr); }
}

.lv-stats .stat small { white-space: normal; overflow: visible; }
@media (min-width: 761px) and (min-height: 420px) { @container content (max-width: 900px) { .acts .c-go { display: none; } } }

@media (max-width: 760px) {
  .acts.ppl tr.live td:first-child { box-shadow: none; }
  .acts.ppl .c-tok .tok2 b::after { content: " novos"; color: var(--ink-3); font-weight: 400; }
}

.acts tbody tr.idle-head { cursor: default; }
.acts tbody tr.idle-head:hover { background: transparent; }
.acts tr.idle-head td { padding: 11px 16px; font-size: 11.5px; color: var(--ink-3); white-space: normal; border-bottom: 0; }
.idle-names { color: var(--ink-2); }
@media (max-width: 760px) { .acts tbody tr.idle, .acts tbody tr.idle-head { display: flex; } .acts tr.idle td.muted { display: none; } }
.card-head h2 { min-width: 0; max-width: 100%; overflow: hidden; }

/* ================================================================ v6: logos, quem responde, exceções, PC, provedores, pedidos */
.prov-mark { background: var(--soft-2); color: var(--ink); }
.prov-mark.logo svg { width: 64%; height: 64%; display: block; }
.prov-mark.src-ic .ic { width: 60%; height: 60%; color: var(--ink-2); }
.tchip { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.model-btn.sm { height: 33.5px; border-radius: 9px; }
.model-btn.empty-pick { border-style: dashed; }
.model-btn .model-txt small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sec-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sec-row h3 { font-size: 12.5px; font-weight: 650; }

/* escolher quem responde */
.modal.tall { width: min(704px, calc(100vw - 25.5px)); }
.modal.tall .modal-body { height: min(432px, calc(100vh - 136px)); max-height: none; overflow: hidden; display: flex; padding-bottom: 3px; }
.chooser { flex: 1; min-height: 0; display: grid; grid-template-columns: 169.5px minmax(0, 1fr); gap: 13px; }
.ch-src { display: flex; flex-direction: column; gap: 2px; min-height: 0; overflow: auto; padding-right: 9.5px; border-right: 1px solid var(--line-2); }
.ch-tab { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6.5px; border: 0; border-radius: 9.5px; background: transparent; text-align: left; }
.ch-tab:hover { background: var(--hover); }
.ch-tab[aria-selected="true"] { background: var(--soft-2); }
.ch-tab-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.ch-tab-txt b { font-weight: 600; font-size: 12px; }
.ch-tab-txt small { font-size: 10.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-dot { width: 6.5px; height: 6.5px; border-radius: 50%; background: var(--accent); flex: none; }
.ch-pane { display: flex; flex-direction: column; gap: 8px; min-height: 0; min-width: 0; }
.ch-pane .pick-list { flex: 1; min-height: 0; max-height: none; margin: 0 -5px; }
.ch-lead { font-size: 11.5px; line-height: 1.5; }
.ch-tools { display: flex; flex-direction: column; gap: 6.5px; }
.ch-hosts { display: flex; flex-direction: column; gap: 9.5px; min-height: 0; overflow: auto; padding-right: 3px; }
.ch-back { align-self: flex-start; padding-left: 0; }
.pick-row > .radio { margin-left: 3px; }
.pick-row[aria-selected="true"] > .radio { border-color: var(--ink); }
.pick-row[aria-selected="true"] > .radio::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.pick-row .pick-badges { max-width: 46%; }

/* Modelos: padrão da equipe | exceções */
.mo-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 13px; align-items: start; }
.mo-lead { margin: -3px 0 8px; }
.team-rows { display: flex; flex-direction: column; gap: 2px; }
.team-labels, .team-row { display: grid; grid-template-columns: minmax(77px, .5fr) minmax(0, 1.15fr) minmax(0, 1fr) 29px; gap: 8px; align-items: center; }
.team-row .model-btn { width: 100%; }
.menu-cap { margin: 2px 8px 2px; font-size: 11px; color: var(--ink-3); font-weight: 500; }
.team-labels { font-size: 11px; color: var(--ink-3); padding: 0 8px 2px; }
.team-row { padding: 5.5px 8px; border-radius: 11px; }
.team-row + .team-row { border-top: 1px solid var(--line-2); }
.tr-from { display: flex; flex-direction: column; min-width: 0; }
.tr-from b { font-weight: 650; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-from small { font-size: 11px; }
.tr-note { padding-left: 3px; }
.proxy-line { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 9.5px; margin-top: 9.5px; padding: 8px 11px; border-radius: 11px; background: var(--soft); flex: none; }
.proxy-line .switch { margin-left: auto; }
.ex-list { list-style: none; margin: 0 -5px; padding: 0; display: flex; flex-direction: column; }
.ex { display: flex; flex-direction: column; gap: 5px; padding: 8px 5px; }
.ex + .ex { border-top: 1px solid var(--line-2); }
.ex-who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ex-who .two > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.ex-who .two small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-line { display: grid; grid-template-columns: 77px minmax(0, 1fr) 25.5px; align-items: center; gap: 6.5px; padding-left: 32px; }
.ex-line.same .model-btn { opacity: .72; }
.ex-alias { display: flex; flex-direction: column; gap: 2px; font-size: 11.5px; }
.ex-alias small { font-size: 10px; overflow-wrap: anywhere; }
.ex-warn { align-items: flex-start; }
.ex-warn .seg { align-self: flex-start; }
.ex-mini { margin: 0; padding-left: 14.5px; font-size: 11.5px; display: flex; flex-direction: column; gap: 2px; }
.mo-ex > .empty { padding: 19px 9.5px; }

/* PC e pessoa */
.pc-status { display: flex; align-items: center; gap: 9.5px; padding: 9.5px 11px; border-radius: 11px; background: var(--soft); }
.pc-status.good { background: var(--good-soft); }
.pc-status.warn { background: var(--warn-soft); }
.pc-status.bad { background: var(--bad-soft); }
.pc-status > div { display: flex; flex-direction: column; min-width: 0; }
.pc-status b { font-weight: 650; font-size: 13.5px; }
.pc-status small { font-size: 11px; color: var(--ink-2); overflow-wrap: anywhere; }
.pc-status > .dot { width: 8px; height: 8px; }
.disc-wrap { border-top: 1px solid var(--line-2); }
.disc { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9.5px 2px 5px; border: 0; background: none; font-weight: 600; color: var(--ink-2); }
.disc:hover { color: var(--ink); }
.disc[aria-expanded="true"] .dd-chev { transform: rotate(180deg); }
.disc-body { display: flex; flex-direction: column; gap: 13px; padding-top: 6.5px; }
.mp-row { grid-template-columns: 69px minmax(0, 1fr) 25.5px; gap: 8px; padding: 3px 5px; }
.mb-name { display: inline-flex; align-items: center; gap: 5.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Provedores */
.pv-bar { display: flex; align-items: center; justify-content: space-between; gap: 9.5px; }
.pv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); grid-auto-rows: max-content; gap: 11px; align-content: start; }
.pv { display: flex; flex-direction: column; gap: 9.5px; cursor: pointer; transition: border-color .15s; }
.pv:hover { border-color: var(--ink-3); }
.pv-head { display: flex; align-items: center; gap: 9.5px; width: 100%; padding: 0; border: 0; background: none; text-align: left; border-radius: 9.5px; }
.pv-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pv-title b { font-size: 14px; font-weight: 650; }
.pv-title small { font-size: 11px; }
.pv-head .status { font-size: 11px; }
.pv-bal { display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 8px; }
.pv-bal b { font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.pv-bal .meter { flex-basis: 100%; }
.pv-accts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pv-acct { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pv-acct-top { display: flex; align-items: center; gap: 5px; font-size: 11.5px; min-width: 0; }
.pv-acct-top .acct-name { font-weight: 550; }
.pv-acct-top .tag.tiny { margin-left: 0; }
.mdl li { padding: 5px 6px 5px 5px; }
.mdl .ep-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.mdl .ep-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mdl li > .btn { flex: none; }
.pv-new { display: flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--ink-2); font: inherit; font-size: 12px; cursor: pointer; text-align: left; }
.pv-new:hover { color: var(--ink); }
.pv-new svg { width: 12px; height: 12px; }
.pv-acct-val { margin-left: auto; white-space: nowrap; color: var(--ink-2); padding-left: 6.5px; }
.pv-acct-val b { color: var(--ink); font-weight: 600; }
.pv-acct small { font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-yield { display: flex; align-items: center; gap: 6.5px; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line-2); font-size: 11px; color: var(--ink-2); cursor: help; }
.pv-yield .ic { width: 12px; height: 12px; color: var(--s4); }
.pv-yield b { color: var(--ink); font-weight: 600; }
.drawer .accts { grid-template-columns: minmax(0, 1fr); }
.drawer .credits { grid-template-columns: minmax(0, 1fr); }
.y-hero { display: flex; flex-direction: column; gap: 5px; padding: 11px 13px; border-radius: 13px; background: var(--soft); }
.y-nums { display: flex; flex-wrap: wrap; gap: 5px 19px; }
.y-nums span { display: flex; flex-direction: column; }
.y-nums b { font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.y-nums small { font-size: 11px; color: var(--ink-2); }
.y-models td, .y-models th { font-size: 11px; }
.y-evo { display: flex; flex-direction: column; gap: 5px; }
.y-evo .spark { height: 51px; }
/* consumo do GPT: mapa do ano (53 semanas × 7 dias), como o do Codex */
.heat { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, minmax(1px, 1fr)); grid-template-columns: repeat(53, minmax(1px, 1fr)); gap: 2px; }
.heat i { aspect-ratio: 1; border-radius: 2px; background: var(--soft-2); }
.gpt-tbl th, .gpt-tbl td { white-space: nowrap; }
.heat i[data-l="1"] { background: color-mix(in srgb, var(--accent) 30%, var(--soft-2)); }
.heat i[data-l="2"] { background: color-mix(in srgb, var(--accent) 55%, var(--soft-2)); }
.heat i[data-l="3"] { background: color-mix(in srgb, var(--accent) 78%, var(--soft-2)); }
.heat i[data-l="4"] { background: var(--accent); }
.heat-months { display: grid; grid-template-columns: repeat(53, minmax(1px, 1fr)); margin-top: 5px; font-size: 11px; color: var(--ink-3); }
.heat-months span { white-space: nowrap; }

/* Atividade: um item por pedido */
.acts.pds td.c-prompt { white-space: normal; width: 46%; max-width: 0; }
.pd-main { display: flex; flex-direction: column; gap: 2.5px; min-width: 0; }
.pd-asked { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; color: var(--ink); }
.pd-asked.muted { font-weight: 450; color: var(--ink-2); }
.pd-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 8px; font-size: 11px; color: var(--ink-3); }
.pd-sub .status { font-size: 11px; }
.run-ink { color: var(--accent); }
.acts.pds .c-pairs { white-space: normal; width: 1%; min-width: 120px; }
.acts.pds tr.pd .go-ic { transition: transform .15s; }
.acts.pds tr.pd.open .go-ic { transform: rotate(180deg); color: var(--ink); }
.acts.pds tr.pd.open > td { background: var(--soft); }
.acts.pds tr.pd.running > td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.acts tbody tr.pd-detail { cursor: default; }
.acts tbody tr.pd-detail:hover { background: transparent; }
.acts tr.pd-detail > td { padding: 0 11px 11px 16px; border-top: 0; background: var(--soft); white-space: normal; }
.pd-box { display: flex; flex-direction: column; gap: 3px; padding: 5px; border-radius: 11px; border: 1px solid var(--line); background: var(--card); }
.pt-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.pt-btn { width: 100%; display: grid; grid-template-columns: 40px 168px minmax(0, 1fr) 64px 48px; align-items: center; gap: 9.5px; padding: 5px 6.5px; border: 0; border-radius: 8px; background: transparent; text-align: left; font-size: 11px; }
.pt-btn:hover { background: var(--hover); }
.pt-btn .pair { justify-self: start; }
.pt-at { font-size: 11px; font-variant-numeric: tabular-nums; }
.pt-what { display: flex; align-items: center; gap: 5px; min-width: 0; }
.pt-what .act-line { flex: 1; }
.pt-what .tag.tiny { margin-left: 0; }
.pt-tok { justify-self: end; }
.pt-dur { font-size: 11px; text-align: right; }
.pt-agent { margin: 3px 0 3px 46.5px; padding-left: 6.5px; border-left: 2px solid var(--line); }
.pt-agent-head { display: flex; align-items: center; gap: 6.5px; padding: 3px 6.5px; font-size: 11px; }
.pt-agent-head .ic { width: 11px; height: 11px; color: var(--s4); }
.pt-agent .pt-btn { grid-template-columns: 40px 168px minmax(0, 1fr) 64px 48px; }
.pt-btn.one, .pt-agent .pt-btn.one { grid-template-columns: 40px minmax(0, 1fr) 64px 48px; }
.pd-foot { display: flex; justify-content: flex-end; padding: 0 3px; }

@media (min-width: 761px) and (min-height: 420px) {
  #v-modelos { overflow: hidden; }
  .mo-layout { flex: 1 1 auto; min-height: 0; align-items: start; }
  .mo-layout > .card { min-height: 0; max-height: 100%; }
  #v-contas { overflow: hidden; }
  .pv-bar { flex: none; }
  .pv-grid { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 1px; }
  @container content (max-width: 980px) {
    .mo-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1.3fr) minmax(0, 1fr); }
  }
  @container content (max-width: 900px) {
    .acts.pds .c-pairs, .acts.pds .c-cost { display: none; }
    .pt-btn, .pt-agent .pt-btn { grid-template-columns: 35px 144px minmax(0, 1fr) 61px; }
    .pt-dur { display: none; }
  }
  @container content (max-height: 640px) {
    .team-row { padding: 4px 8px; }
    .model-btn { height: 33.5px; }
    .model-btn.sm { height: 30.5px; }
    .mo-lead { display: none; }
    .ex { padding: 5.5px 5px; }
  }
  @container content (max-height: 500px) {
    .team-labels { display: none; }
    .proxy-line { margin-top: 5px; padding: 5px 9.5px; }
    .proxy-line small { display: none; }
  }
}
@media (max-width: 760px) {
  .mo-layout { grid-template-columns: minmax(0, 1fr); }
  .team-labels { display: none; }
  .team-row { grid-template-columns: minmax(0, 1fr) 29px; row-gap: 5px; padding: 6.5px 0; }
  .team-row .tr-from { grid-column: 1 / -1; }
  .team-row > .model-btn { grid-column: 1; }
  .team-row > :last-child { grid-column: 2; grid-row: 2; }
  .team-row.fixed > span:last-child { display: none; }
  .ex-line { padding-left: 0; grid-template-columns: 64px minmax(0, 1fr) 25.5px; }
  .mp-row { grid-template-columns: minmax(0, 1fr) auto; }
  .mp-row .model-btn { grid-column: 1 / -1; grid-row: 2; }
  .acts.pds .c-when { grid-column: 2; grid-row: 1; text-align: right; }
  .acts.pds .c-who { grid-column: 1; grid-row: 1; }
  .acts.pds td.c-prompt { grid-column: 1 / -1; grid-row: 2; width: auto; max-width: none; }
  .acts.pds .c-pairs { grid-column: 1 / -1; grid-row: 3; max-width: none; }
  .acts.pds .c-tok { grid-column: 2; grid-row: 4; }
  .acts.pds .c-time { grid-column: 1; grid-row: 4; text-align: left; color: var(--ink-3); }
  .acts tbody tr.pd-detail { display: block; padding: 0 9.5px 9.5px; background: var(--soft); border-top: 0; }
  .acts tbody tr.pd-detail > td { display: block; padding: 0 !important; }
  .acts.pds tr.pd.open { background: var(--soft); }
  .pt-btn, .pt-agent .pt-btn { grid-template-columns: 35px minmax(0, 1fr) auto; row-gap: 3px; }
  .pt-what { grid-column: 2 / -1; grid-row: 2; }
  .pt-tok { grid-column: 3; grid-row: 1; }
  .pt-dur { display: none; }
  .pt-agent { margin-left: 8px; }
}
@media (max-width: 640px) {
  .modal.tall .modal-body { height: calc(86vh - 120px); }
  .chooser { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 8px; }
  .ch-src { flex-direction: row; overflow-x: auto; overflow-y: hidden; padding: 0 0 5px; border-right: 0; border-bottom: 1px solid var(--line-2); scrollbar-width: none; }
  .ch-tab { width: auto; flex: none; padding: 5px 8px 5px 5px; }
  .ch-tab-txt small { display: none; }
  .ch-group { padding: 0 4px; align-self: center; white-space: nowrap; }
  .pv-bar { flex-direction: column; align-items: stretch; }
}

/* ================================================================ v7: menos repetição, linguagem simples, Ao vivo por pedido */
.live-count { min-width: 14.5px; height: 14.5px; padding: 0 4px; margin-left: auto; border-radius: 7px; background: var(--good); color: #fff; font-size: 10px; font-weight: 700; display: inline-grid; place-items: center; }
.app.collapsed .live-count { position: absolute; top: 2.5px; right: 5px; margin: 0; min-width: 13px; height: 13px; font-size: 9px; }
.act-obj { color: var(--ink-2); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-tool.chore b { font-weight: 450; color: var(--ink-3); }
.act-tool { min-width: 0; }
.acts tbody tr.grp { cursor: default; }
.acts tbody tr.grp:hover { background: transparent; }
.acts tr.grp td { padding: 11px 16px 5px; font-size: 10.5px; font-weight: 650; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.acts tr.grp .count-pill { margin-left: 6.5px; text-transform: none; letter-spacing: 0; }
.acts.pds tr.pd.auto > td { opacity: .62; }
.pd-asked small { font-weight: 450; color: var(--ink-3); }
.pd-asked .tag.tiny { margin: 0 5px 0 0; vertical-align: 1px; }
.pd-sub.now { color: var(--accent); }
.pd-sub.now b { font-weight: 600; }
.pd-sub.now .typing { margin-right: -2px; }
.auto-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 16px; border-top: 1px solid var(--line-2); }
.pd-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; padding: 5px 6.5px 2px; font-size: 11px; }
.pd-sum > .muted { margin-right: 3px; }
.pd-sum .tag { height: 17.5px; font-size: 10.5px; }
.pd-said { padding: 3px 6.5px; font-size: 11.5px; line-height: 1.5; color: var(--ink); }
.pt-task { min-width: 0; max-width: 336px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.pt-agent-head small { flex: none; }
.pd-foot { justify-content: space-between; }

/* Ao vivo */
.lv-head { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 17.5px; align-items: stretch; padding: 11px 14.5px; }
.lv-stats { display: grid; grid-template-columns: minmax(0, 2.2fr) repeat(3, minmax(0, 1fr)); gap: 13px; align-items: start; }
.lv-who { gap: 5px; }
.lv-people { display: flex; flex-wrap: wrap; gap: 5px; }
.lv-person { display: inline-flex; align-items: center; gap: 5.5px; height: 24px; padding: 0 8px 0 2.5px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 11.5px; }
.lv-person:hover { background: var(--soft); }
.lv-person[aria-pressed="true"] { background: var(--accent-soft); border-color: transparent; }
.lv-person b { font-weight: 600; }
.lv-person small { font-size: 11px; }
.lv-person .timer { font-size: 11px; }
.lv-alerts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 5px 6.5px; font-size: 11px; border-top: 1px solid var(--line-2); padding-top: 8px; }
.lv-alerts .kpi-label { margin-right: 3px; font-size: 11px; }
.alert-chip { display: inline-flex; align-items: center; gap: 5px; height: 22.5px; padding: 0 9px 0 7px; border-radius: 999px; border: 0; font-size: 11px; font-weight: 550; }
.alert-chip .ic { width: 11px; height: 11px; }
.alert-chip.warn { background: var(--warn-soft); color: var(--warn-ink); }
.alert-chip.bad { background: var(--bad-soft); color: var(--bad-ink); }
.alert-chip:hover { filter: brightness(.97); }
.lv-alerts[hidden] { display: none; }
.lv-alerts ul { margin: 3px 0 0; padding-left: 14.5px; }
.lv-alerts .disc { width: auto; padding: 0; }
.lv-list { display: flex; flex-direction: column; min-height: 0; }
.lv-list-head { padding: 9.5px 16px 6.5px; margin: 0; }
.lv-filter { display: inline-flex; align-items: center; gap: 8px; margin-right: auto; margin-left: 6.5px; }
.lv-table { min-height: 0; overflow: auto; }
.lv-table > .empty { padding: 32px 9.5px; }
.lv-table .acts thead th { box-shadow: inset 0 -1px 0 var(--line-2); z-index: 1; }

@media (min-width: 761px) and (min-height: 420px) {
  #v-aovivo { display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
  .lv-list { flex: 1 1 auto; }
  @container content (max-width: 1100px) {
    .lv-head { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .lv-chart { border-left: 0; padding-left: 0; border-top: 1px solid var(--line-2); padding-top: 6.5px; }
    .lv-chart .chart-area { height: 45px; }
  }
  @container content (max-height: 560px) {
    .lv-chart { display: none; }
    .lv-head { padding: 8px 11px; }
    .lv-stats .kpi-num { font-size: 20px; }
  }
}
@media (max-width: 760px) {
  .lv-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lv-who { grid-column: 1 / -1; }
  .lv-list-head { flex-wrap: wrap; padding: 9.5px 13px 6.5px; }
  .auto-bar { padding: 8px 13px; }
  .acts.pds tr.grp td { padding: 9.5px 13px 3px; }
  .acts tbody tr.grp { display: block; }
}
@media (min-width: 761px) and (min-height: 420px) {
  @container content (max-width: 900px) { .pt-btn.one, .pt-agent .pt-btn.one { grid-template-columns: 35px minmax(0, 1fr) 61px; } }
}
@media (max-width: 760px) { .pt-btn.one .pt-what { grid-column: 2; grid-row: 1; } }


/* ================================================================ v8: Ranking */
:root { --gold: #c39213; --silver: #8a939d; --bronze: #ad6a36; }
.rk-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 6.5px 8px; }
.rk-bar .dd { height: 29px; border-radius: 999px; }
.rk-count { margin-left: auto; white-space: nowrap; }
.rk-bar .rk-count:empty { display: none; }
.rk-body, .rk-side { display: flex; flex-direction: column; gap: var(--gap, 13px); min-width: 0; }

/* lista de modelos */
.rk-card { --rk-cols: 21px minmax(120px, 2fr) 54.5px repeat(var(--rk-n, 4), minmax(min-content, .5fr)); padding-left: 9.5px; padding-right: 9.5px; }
.rk-card > .card-head { padding: 0 6.5px; }
.rk-head, .rk-row { display: grid; grid-template-columns: var(--rk-cols); align-items: center; column-gap: 9.5px; }
.rk-head { padding: 0 6.5px 5px; border-bottom: 1px solid var(--line-2); font-size: 11px; color: var(--ink-3); flex: none; }
.rk-th { justify-self: end; display: inline-flex; align-items: center; gap: 1px; border: 0; background: none; padding: 3px 5px; margin-right: -5px; border-radius: 6.5px; color: var(--ink-3); font-size: 11px; font-weight: 500; white-space: nowrap; }
.rk-th:hover { background: var(--hover); color: var(--ink); }
.rk-th.on { color: var(--ink); font-weight: 650; }
.rk-arrow { width: 10.5px; height: 10.5px; stroke-width: 2.2; }
.rk-list { display: flex; flex-direction: column; padding-top: 3px; }
.rk-row { width: 100%; min-height: 40px; padding: 5px 6.5px; border: 0; background: transparent; border-radius: 9.5px; text-align: left; color: var(--ink); font: inherit; }
.rk-row:hover { background: var(--hover); }
.rk-row.out { opacity: .5; }
.rk-more { margin: 5px -5px -3px auto; }
.rk-bar > .seg:last-child { margin-left: 3px; }
.rk-row.out:hover { opacity: .8; }
.rk-pos { font-size: 11.5px; font-weight: 650; color: var(--ink-3); text-align: center; }
.medal { width: 17.5px; height: 17.5px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-size: 10.5px; font-weight: 700; justify-self: center; }
.medal.m1 { background: var(--gold); } .medal.m2 { background: var(--silver); } .medal.m3 { background: var(--bronze); }
.rk-model { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rk-mname { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.rk-mname b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-mname small, .rk-tname { font-size: 11px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-tname { font-size: 11.5px; color: var(--ink); }
.rk-sp { display: flex; align-items: center; }
.rk-spark { width: 57.5px; height: 17.5px; display: block; overflow: visible; }
.rk-spark-line { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.rk-spark-dot { fill: var(--accent); }
.rk-spark-bar { fill: var(--accent); opacity: .65; }
.rk-cell { text-align: right; font-size: 12px; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rk-cell.on { color: var(--ink); font-weight: 650; font-size: 13px; }
.rk-cell.weak { color: var(--ink-3); font-weight: 450; }
.rk-sep { display: flex; align-items: center; gap: 5px; padding: 11px 6.5px 3px; font-size: 10.5px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.rk-sep .info { text-transform: none; }
.rk-sort-dd { display: none; }

/* pódio */
.pod { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 5px 14.5px; }
.pod-col { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pod-title { font-size: 11px; color: var(--ink-3); font-weight: 500; padding-bottom: 2px; }
.pod-list { list-style: none; margin: 0 -5px; padding: 0; display: flex; flex-direction: column; }
.pod-row { width: 100%; display: flex; align-items: center; gap: 6.5px; padding: 3px 5px; border: 0; background: none; border-radius: 8px; text-align: left; min-width: 0; font: inherit; color: var(--ink); }
.pod-row:hover { background: var(--hover); }
.pod-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.pod-row b { font-size: 11.5px; font-weight: 650; white-space: nowrap; }
.pod-row .medal { width: 15px; height: 15px; font-size: 9.5px; flex: none; }
.pod-none { padding: 5px 0; }

/* tempo por pedido e ferramentas */
.rk-tbl { font-size: 11.5px; }
.rk-tbl td, .rk-tbl th { padding: 5px 6.5px; }
.rk-tbl th:first-child, .rk-tbl td:first-child { padding-left: 0; }
.rk-tbl th:last-child, .rk-tbl td:last-child { padding-right: 0; }
.rk-tbl td { white-space: nowrap; }
.rk-tbl td:first-child { max-width: 0; width: 52%; }
.rk-tbl .rk-model { gap: 6.5px; }
.rk-tbl tr.weak td, .rk-tbl tr.weak .rk-tname { color: var(--ink-3); }
.tf-list { list-style: none; margin: 0 -5px; padding: 0; display: flex; flex-direction: column; }
.tf-row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 43px; align-items: center; gap: 8px; padding: 5px; border-radius: 8px; }
.tf-row:hover { background: var(--hover); }
.tf-row + .tf-row { border-top: 1px solid var(--line-2); }
.tf-main, .tf-model { display: flex; min-width: 0; }
.tf-main { flex-direction: column; line-height: 1.3; }
.tf-main b { font-weight: 600; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tf-main small, .tf-model small { font-size: 11px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tf-model { align-items: center; gap: 5px; }
.tf-n { display: flex; flex-direction: column; align-items: flex-end; gap: 2.5px; }
.tf-n b { font-weight: 650; font-size: 12px; }
.tf-n .bar { width: 100%; height: 3px; }
.tf-n .bar > span { background: var(--bad); opacity: .7; }

/* detalhe do modelo */
.rk-dhead { display: flex; align-items: center; gap: 9.5px; }
.rk-dhead .two { flex: 1; }
.rk-places .tag { height: 21px; }
.medal-tag { color: #fff; font-weight: 650; }
.medal-tag.m1 { background: var(--gold); } .medal-tag.m2 { background: var(--silver); } .medal-tag.m3 { background: var(--bronze); }
.rk-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line-2); border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.rk-stat { display: flex; flex-direction: column; gap: 2px; padding: 9.5px 11px; background: var(--card); min-width: 0; }
.rk-stat > b { font-size: 20px; font-weight: 650; letter-spacing: -.01em; line-height: 1.2; }
.rk-stat small { font-size: 11px; }
.rk-block { display: flex; flex-direction: column; gap: 6.5px; }
.rk-block h3 { margin: 0; font-size: 11.5px; font-weight: 650; }
.rk-chart { width: 100%; height: auto; display: block; overflow: visible; }
.rk-chart .tick { fill: var(--ink-3); font-size: 10px; font-family: var(--font); }
.rk-hit { fill: transparent; }
.rk-bar-g:hover .rk-hit { fill: var(--hover); }
.rk-bar-r { fill: var(--accent); }
.rk-q { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rk-q li { display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 8px; padding: 6.5px 0; border-top: 1px solid var(--line-2); font-size: 12px; }
.rk-q li:first-child { border-top: 0; padding-top: 0; }
.rk-q li > span { flex: 1; color: var(--ink-2); }
.rk-q li > b { font-weight: 650; }
.rk-q li > small { flex-basis: 100%; font-size: 11px; }
.rk-foot { line-height: 1.6; }
.rk-empty { flex: 1; }

/* Ranking: sem rolagem dentro dos cartões; se não couber, a tela rola inteira (uma barra só) */
@media (min-width: 761px) and (min-height: 420px) {
  #v-ranking { overflow-y: auto; overflow-x: hidden; }
  #v-ranking > * { flex-shrink: 0; }
  .rk-body { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(240px, 1fr); align-items: start; }
  .rk-side { display: flex; flex-direction: column; }
  @container content (min-width: 1500px) { .rk-body { grid-template-columns: minmax(0, 2fr) minmax(288px, 1fr); } }
  @container content (max-width: 980px) {
    .rk-card { --rk-cols: 21px minmax(104px, 1.4fr) repeat(var(--rk-n, 4), minmax(45px, .6fr)); }
    .rk-head .rk-sp, .rk-row .rk-sp { display: none; }
  }
  /* estreito (zoom alto): lista em cima, o resto embaixo em duas colunas */
  @container content (max-width: 860px) {
    .rk-body { grid-template-columns: minmax(0, 1fr); }
    .rk-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  }
  @container content (max-height: 560px) {
    .rk-row { min-height: 33.5px; padding-top: 3px; padding-bottom: 3px; }
    .pod-row { padding: 2px 5px; }
  }
}
/* celular e lista estreita: só a coluna escolhida; a ordem vira um menu */
@container content (max-width: 640px) {
  .rk-card { --rk-cols: 21px minmax(0, 1fr) auto; }
  .rk-head { display: none; }
  .rk-cell:not(.on), .rk-sp { display: none; }
  .rk-sort-dd { display: inline-flex; }
}
@media (max-width: 760px) {
  .rk-card { --rk-cols: 21px minmax(0, 1fr) auto; }
  .rk-head { display: none; }
  .rk-cell:not(.on), .rk-sp { display: none; }
  .rk-sort-dd { display: inline-flex; height: 25.5px; font-size: 11.5px; border-radius: 999px; }
  .rk-count { margin-left: 0; }
  .pod { grid-template-columns: minmax(0, 1fr); }
  .rk-list { max-height: none; }
  .rk-tbl .opt { display: none; }
  .rk-stats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
:root[data-theme="dark"] { --gold: #b5880f; --silver: #7d8690; --bronze: #9c5f30; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --gold: #b5880f; --silver: #7d8690; --bronze: #9c5f30; } }

/* Ao longo do dia */
:root { --c1: #2a78d6; --c2: #eb6834; --c3: #1baf7a; --c4: #8b5cf6; --c5: #d99a00; --c6: #d6457f; }
:root[data-theme="dark"] { --c1: #3987e5; --c2: #e0703f; --c3: #22b583; --c4: #9b75f7; --c5: #d9a520; --c6: #e0618f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --c1: #3987e5; --c2: #e0703f; --c3: #22b583; --c4: #9b75f7; --c5: #d9a520; --c6: #e0618f; } }
.key.c1, .tl-pt.c1 { background: var(--c1); fill: var(--c1); } .key.c2, .tl-pt.c2 { background: var(--c2); fill: var(--c2); } .key.c3, .tl-pt.c3 { background: var(--c3); fill: var(--c3); }
.key.c4, .tl-pt.c4 { background: var(--c4); fill: var(--c4); } .key.c5, .tl-pt.c5 { background: var(--c5); fill: var(--c5); } .key.c6, .tl-pt.c6 { background: var(--c6); fill: var(--c6); }
.tl-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.tl-line.c1 { stroke: var(--c1); } .tl-line.c2 { stroke: var(--c2); } .tl-line.c3 { stroke: var(--c3); } .tl-line.c4 { stroke: var(--c4); } .tl-line.c5 { stroke: var(--c5); } .tl-line.c6 { stroke: var(--c6); }
.tl-pt { stroke: var(--card); stroke-width: 1.5; }
.tl-sel { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 3 3; }
.tl-cursor { stroke: var(--ink-2); stroke-width: 1; }
.tl-svg { cursor: pointer; }
.tl-chart { height: clamp(176px, 44vh, 336px); min-width: 0; }
.tl-legend { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9.5px; }
.tl-key { display: inline-flex; align-items: center; gap: 5.5px; height: 24px; padding: 0 9px 0 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 11.5px; color: var(--ink); }
.tl-key:hover { background: var(--soft); }
.tl-key b { font-weight: 650; }
.tl-key[aria-pressed="false"] { opacity: .45; }
.tl-key[aria-pressed="false"] .key { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.bk-sum { display: flex; flex-wrap: wrap; gap: 3px 13px; font-size: 12px; color: var(--ink-2); padding-bottom: 8px; border-bottom: 1px solid var(--line-2); }
.bk-sum b { color: var(--ink); font-weight: 650; }
.bk-sum .bad-ink b { color: var(--bad-ink); }
.bk-list, .ins-list, .qt-list { list-style: none; margin: 5px -5px 0; padding: 0; display: flex; flex-direction: column; }
.bk-row { width: 100%; display: grid; grid-template-columns: 16px minmax(0, 1fr) auto 45px 51px; align-items: center; gap: 6.5px; padding: 5px; border: 0; background: none; border-radius: 8px; text-align: left; font: inherit; font-size: 12px; color: var(--ink); }
.bk-row:hover { background: var(--hover); }
.bk-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-v { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ins-row { width: 100%; display: flex; align-items: flex-start; gap: 8px; padding: 6.5px 5px; border: 0; background: none; border-radius: 8px; text-align: left; font: inherit; color: var(--ink); }
.ins-row:hover, .ins-row.on { background: var(--hover); }
.ins-ic { width: 22.5px; height: 22.5px; border-radius: 6.5px; background: var(--soft); display: grid; place-items: center; flex: none; color: var(--ink-2); }
.ins-ic .ic { width: 12px; height: 12px; }
.ins-row.warn .ins-ic { background: var(--warn-soft); color: var(--warn-ink); }
.ins-row.bad .ins-ic { background: var(--bad-soft); color: var(--bad-ink); }
.ins-row.good .ins-ic { background: var(--good-soft); color: var(--good-ink); }
.ins-txt { display: flex; flex-direction: column; min-width: 0; font-size: 12px; line-height: 1.35; }
.ins-txt small { font-size: 11px; color: var(--ink-3); }

/* Mapa */
.mp-chart { position: relative; height: clamp(240px, 58vh, 448px); min-width: 0; }
.mp-svg { position: absolute; inset: 0; }
.mp-g0 { stop-color: var(--good-soft); stop-opacity: 1; }
.mp-g1 { stop-color: var(--good-soft); stop-opacity: 0; }
.mp-best-t { fill: var(--good-ink); font-size: 11px; font-weight: 650; font-family: var(--font); }
.mp-axis { fill: var(--ink-3); font-size: 10.5px; font-family: var(--font); }
.mp-dot { position: absolute; transform: translate(-50%, -50%); border-radius: 50%; border: 2px solid var(--card); background: var(--soft-2); display: grid; place-items: center; padding: 0; box-shadow: 0 1px 3px rgb(0 0 0 / .12), 0 0 0 1px var(--line); transition: transform .12s; }
.mp-dot:hover, .mp-dot:focus-visible { transform: translate(-50%, -50%) scale(1.08); z-index: 2; }
.mp-dot .prov-mark { width: 62%; height: 62%; background: transparent; border-radius: 50%; }
.mp-dot .prov-mark.logo svg { width: 100%; height: 100%; }
.mp-label { position: absolute; display: flex; flex-direction: column; align-items: center; line-height: 1.2; pointer-events: none; text-align: center; }
.mp-label b { font-size: 11px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.mp-label small { font-size: 10.5px; color: var(--ink-3); white-space: nowrap; }
.mp-out { margin-top: 6.5px; }
.link-btn.inline { padding: 0 2px; font-size: inherit; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
@media (max-width: 760px) {
  .rk-bar > .seg:last-child { margin-left: 0; }
  .tl-chart { height: 192px; }
  .mp-chart { height: 272px; }
  .bk-row { grid-template-columns: 16px minmax(0, 1fr) auto 41.5px; }
  .bk-row .bk-v:last-child { display: none; }
}

/* ================================================================ v8: uma rolagem só
 * Cada tela rola inteira, com uma barra só (a da própria tela). Nenhum cartão, lista ou tabela rola por dentro:
 * o que é comprido mostra o principal e abre o resto numa gaveta, ou simplesmente continua na página. */
@media (min-width: 761px) and (min-height: 420px) {
  #content > .view { overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-gutter: stable; }
  #v-aovivo { display: flex; }
  .fit-card { overflow: visible; }
  .card-scroll, .act-list, .lv-table, .pv-grid, #v-equipe > .people { flex: none; min-height: auto; overflow: visible; }
  .pn-body, .act-card, .lv-list, .mo-layout { flex: none; min-height: auto; }
  .pn-side { grid-template-rows: none; align-content: start; }
  .chart-card .chart-area { flex: none; height: clamp(176px, 42vh, 320px); }
  .mo-layout > .card { max-height: none; }
  .card.flush, .act-card { overflow: clip; }
  .acts thead th { position: sticky; top: 0; }
  @container content (max-width: 720px) { .pn-body { grid-template-rows: none; } .pn-side { grid-template-rows: none; } }
  @container content (max-width: 980px) { .mo-layout { grid-template-rows: none; } }
}

/* Modelos: quando a coluna é estreita, os dois botões descem para baixo do nome */
@media (min-width: 761px) and (min-height: 420px) {
  @container content (max-width: 1240px) {
    .mo-team .team-labels { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 29px; }
    .mo-team .team-labels > span:first-child { display: none; }
    .mo-team .team-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 29px; row-gap: 5px; }
    .mo-team .team-row .tr-from { grid-column: 1 / -1; flex-direction: row; align-items: baseline; gap: 6.5px; }
  }
}
.pv-bar { justify-content: flex-end; }
@media (min-width: 761px) and (min-height: 420px) { .pn-body { align-items: start; } .pn-side .fit-card { min-height: auto; } }

/* ================================================================ v9: versões A/B e telas que preenchem a altura
 * Quando sobra altura, o miolo da tela (.fill) cresce até o fim e os cartões (.grow) esticam junto:
 * gráficos ocupam o espaço e listas (.fit-list) mostram quantas linhas couberem, com "Ver todos" para o resto.
 * Quando falta altura, o miolo fica no tamanho mínimo e a tela rola inteira (nunca um cartão por dentro). */
.rk-more[hidden] { display: none; }
.card.grow { display: flex; flex-direction: column; min-width: 0; }
.plans .lims { margin-bottom: -5px; }
@media (min-width: 761px) and (min-height: 420px) {
  .fill { flex: 1 1 0; min-height: auto; } /* cresce até o fim da tela; nunca fica menor que o próprio conteúdo mínimo */
  .fill .card.grow, .fill .chart-card { min-height: 0; }
  .fit-list { flex: 1 1 0; min-height: calc(var(--fit-min, 3) * var(--fit-row, 41.5px)); overflow: clip; }
  .rank.fit-list { --fit-row: 46.5px; }

  /* Painel A: gráfico | (Uso por cresce · Planos) */
  .pn-body.fill { display: grid; grid-template-columns: minmax(0, 1fr) clamp(240px, 32%, 368px); grid-template-rows: minmax(auto, 1fr); align-items: stretch; }
  .pn-body.fill > .chart-card { display: flex; flex-direction: column; }
  .pn-body.fill .chart-area, .pn-b .chart-area { flex: 1 1 0; height: auto; min-height: 160px; }
  .pn-body.fill > .pn-side { display: flex; flex-direction: column; gap: var(--gap); min-height: 0; }
  .pn-side > .card.grow { flex: 1 1 auto; }
  .pn-side > .plans { flex: none; }
  @container content (max-width: 720px) { .pn-body.fill { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(208px, 1fr) auto; } }

  /* Painel B: gráfico largo em cima, três colunas embaixo */
  .pn-b { display: flex; flex-direction: column; gap: var(--gap); }
  .pn-b > .chart-card { display: flex; flex-direction: column; flex: 1.4 1 0; min-height: auto; }
  .pn-b > .pn-b-row { flex: 1 1 0; min-height: auto; }
  .pn-b .chart-area { min-height: 120px; }
  .pn-b-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); min-height: 0; }
  .pn-b-row > .card { min-height: 0; }
  @container content (max-width: 860px) { .pn-b-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pn-b-row > .plans { grid-column: 1 / -1; } }
}
@media (max-width: 760px) {
  .pn-b-row { display: flex; flex-direction: column; gap: 9.5px; }
  .pn-b { display: flex; flex-direction: column; gap: 9.5px; }
  .pn-b .chart-area { height: 176px; }
}
@media (min-width: 761px) and (min-height: 420px) {
  /* altura de notebook (1366×768): números do topo e planos mais enxutos para o miolo caber sem rolar */
  @container content (max-height: 780px) {
    .kpi { padding: 9.5px 14.5px; gap: 3px; }
    .hero-num { font-size: clamp(27px, 3.4vw, 36px); }
    .kpi-num { font-size: 23.5px; }
    .compo-legend { display: none; }
    .compo { margin: 5px 0 0; }
    .plans .lim-sub { display: none; }
    .plans .lim { padding: 5.5px 8px; }
    .plans .lim-main { gap: 3px; }
  }
}
/* Painel A: planos numa célula do topo */
.kpi-plans .kpi-label { width: 100%; }
.kpi-plans .sm-link { margin-left: auto; padding: 0 2px; }
.kpi-plans .sm-link .ic { width: 12px; height: 12px; }
.pc-list { display: flex; flex-direction: column; gap: 4px; margin-top: 3px; }
.pc-row { display: grid; grid-template-columns: 16px minmax(0, 1fr) minmax(29px, 51px) 35px; align-items: center; gap: 6.5px; font-size: 11.5px; color: var(--ink); border-radius: 6.5px; padding: 2px 3px; margin: 0 -3px; }
.pc-row:hover { background: var(--hover); }
.pc-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.pc-row b { font-weight: 650; text-align: right; white-space: nowrap; }
.pc-row .meter { height: 4px; }
@media (min-width: 761px) and (min-height: 420px) {
  @container content (max-height: 780px) { .kpi:not(.hero) .mini-l { display: none; } .kpi-foot { gap: 2px 8px; } }
}
@media (min-width: 761px) and (min-height: 420px) { .kpis.has-plans { grid-template-columns: minmax(0, 1.35fr) minmax(0, .9fr) minmax(0, .9fr) minmax(0, 1.35fr); } }
.pc-row { grid-template-columns: 16px minmax(0, 1fr) minmax(22.5px, 45px) auto; }
@media (min-width: 761px) and (min-height: 420px) { @container content (max-height: 780px) { .pn-b-row .plans .lim { padding: 4px 8px; } } }
.pn-b-row .plans .lim-sub { display: none; }
.pn-b-row .plans .lim { padding: 5px 8px; }
.pn-b-row .plans .lim-main { gap: 3px; }
/* o desenho do gráfico não empurra a altura: a caixa cresce pelo espaço da tela e o SVG é redesenhado no tamanho dela */
@media (min-width: 761px) and (min-height: 420px) {
  .fill .chart-area { position: relative; }
  .fill .chart-area > .chart { position: absolute; inset: 0; min-height: 0; }
}

/* Equipe B: tabela, uma linha por PC */
.tm th:first-child, .tm td:first-child { padding-left: 16px; }
.tm th:last-child, .tm td:last-child { padding-right: 13px; }
.tm td { white-space: nowrap; }
.tm-pc { display: inline-flex; align-items: center; gap: 6.5px; font-size: 12px; }
.tm-pc b { font-weight: 600; }
.tm-models { white-space: normal !important; }
.tm-ex { display: inline-flex; align-items: center; gap: 4px; height: 21px; padding: 0 7px 0 5px; margin: 2px 3px 2px 0; border-radius: 6.5px; background: var(--soft); font-size: 11px; }
.tm-ex b { font-weight: 600; }
.tm-ex .prov-mark { width: 14.5px; height: 14.5px; border-radius: 4px; }
.tm tr.tm-bad td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.tm tr.tm-warn td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.tm tr.tm-off td { color: var(--ink-2); }

/* Provedores B: abas no topo, detalhe em colunas */
.pv-md { display: flex; flex-direction: column; gap: var(--gap, 13px); }
.pv-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)); gap: 8px; }
.pv-tab { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 9.5px; padding: 9.5px 11px; border: 1px solid var(--line); border-radius: 13px; background: var(--card); text-align: left; font: inherit; color: var(--ink); }
.pv-tab:hover { background: var(--soft); }
.pv-tab[aria-selected="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.pv-tab-main { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.pv-tab-main b { font-weight: 650; }
.pv-tab-main .status { font-size: 11px; }
.pv-tab-val { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; min-width: 51px; font-size: 11.5px; }
.pv-tab-val b { font-weight: 650; }
.pv-tab-val .meter { width: 51px; }
.pv-cols { columns: 2 304px; column-gap: 22.5px; }
.pv-cols > * { break-inside: avoid; margin-bottom: 14.5px; }
.pv-cols > *:last-child { margin-bottom: 0; }

/* Modelos B: grade quem responde o quê */
.mg { display: flex; flex-direction: column; margin: 0 -6.5px; }
.mg-row { display: grid; grid-template-columns: minmax(120px, 1.1fr) repeat(var(--mg-n, 4), minmax(0, 1fr)); gap: 6.5px; align-items: center; padding: 6.5px; border-radius: 9.5px; }
.mg-row + .mg-row { border-top: 1px solid var(--line-2); border-radius: 0; }
.mg-head { font-size: 11px; color: var(--ink-3); padding-top: 0; padding-bottom: 5px; }
.mg-head > span:not(:first-child) { padding-left: 3px; font-weight: 600; color: var(--ink-2); font-size: 11.5px; }
.mg-team { background: var(--soft); border-radius: 9.5px !important; border-top: 0 !important; margin-bottom: 3px; }
.mg-who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mg-who .two > span { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mg-who .two small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mg-ic { width: 24px; height: 24px; border-radius: 7px; background: var(--soft-2); display: grid; place-items: center; flex: none; color: var(--ink-2); }
.mg-ic .ic { width: 13px; height: 13px; }
.mg-team .mg-ic { background: var(--card); }
.mg-cell { width: 100%; min-width: 0; display: flex; align-items: center; gap: 6.5px; height: 40px; padding: 0 8px; border: 1px solid transparent; border-radius: 9.5px; background: transparent; text-align: left; font: inherit; color: var(--ink); opacity: .55; }
.mg-cell:hover:not(:disabled) { background: var(--hover); opacity: .9; }
.mg-cell.own { opacity: 1; background: var(--card); border-color: var(--line); }
.mg-row:not(.mg-team) .mg-cell.own { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.mg-cell:disabled { cursor: default; }
.mg-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.mg-txt b { font-weight: 600; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mg-txt small { font-size: 10.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mg-empty { padding: 13px 6.5px; }
.mg-card .proxy-line { margin-top: 9.5px; }
@media (min-width: 761px) and (min-height: 420px) {
  @container content (max-width: 900px) { .mg-row { grid-template-columns: minmax(88px, .8fr) repeat(var(--mg-n, 4), minmax(0, 1fr)); } .mg-cell .prov-mark { display: none; } }
}
@media (max-width: 760px) {
  .mg-head { display: none; }
  .mg-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mg-who { grid-column: 1 / -1; }
}
/* Modelos B: grade em cima, últimas mudanças embaixo ocupando o resto */
.mg-wrap { display: flex; flex-direction: column; gap: var(--gap, 13px); }
.mg-hist .timeline { margin-top: -3px; }
@media (min-width: 761px) and (min-height: 420px) { .mg-wrap > .mg-card { flex: none; } .mg-wrap > .mg-hist { flex: 1 1 auto; } .mg-hist .timeline.fit-list { --fit-row: 41.5px; } }
.pv-cols > .dev-sec { border-top: 0; padding-top: 0; }
.edit-sec-head h3 .info { margin-left: 5px; vertical-align: 1px; }
.timeline.fit-list > li:has(+ li[hidden])::before { display: none; }
/* Atividade B: pessoas fixas à esquerda, pedidos à direita */
.act-md { display: grid; grid-template-columns: minmax(200px, 240px) minmax(0, 1fr); gap: var(--gap, 13px); align-items: start; }
.act-people { position: sticky; top: 0; padding: 11px 8px; }
.act-people > .card-head { padding: 0 6.5px; margin-bottom: 5px; }
.side-ppl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.side-p { width: 100%; display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6.5px; border: 0; border-radius: 9.5px; background: transparent; text-align: left; font: inherit; color: var(--ink); }
.side-p:hover { background: var(--hover); }
.side-p.on { background: var(--soft-2); }
.side-p .two > span { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-p .two small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-n { display: flex; flex-direction: column; align-items: flex-end; font-size: 11.5px; line-height: 1.25; }
.side-n b { font-weight: 650; }
.side-n small { font-size: 10.5px; color: var(--ink-3); white-space: nowrap; }
.side-idle { padding: 8px 6.5px 0; }
@media (min-width: 761px) and (min-height: 420px) {
  .act-md.fill { align-items: start; }
  .act-md > .act-card { min-height: 100%; }
  @container content (max-width: 860px) { .act-md { grid-template-columns: minmax(0, 1fr); } .act-people { position: static; } .side-ppl { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); } }
}
@media (max-width: 760px) { .act-md { grid-template-columns: minmax(0, 1fr); } .act-people { position: static; } }
.act-md .acts .c-cost { display: none; }
.act-md .acts.pds td.c-prompt { min-width: 176px; }
.act-md .acts .c-pairs .pair { max-width: 176px; }
.side-sum { display: flex; flex-direction: column; gap: 6.5px; margin: 9.5px 0 0; padding: 9.5px 6.5px 0; border-top: 1px solid var(--line-2); }
.side-pairs { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.side-devs { display: flex; flex-wrap: wrap; gap: 5px; }
/* Ranking: as três visões ocupam a altura da tela */
.rk-row { min-height: var(--rk-row, 40px); }
@media (min-width: 761px) and (min-height: 420px) {
  .rk-body.fill { align-items: stretch; }
  .rk-body.fill > .card { display: flex; flex-direction: column; min-height: 0; }
  .rk-body.fill > .rk-side { display: flex; flex-direction: column; min-height: 0; }
  .rk-body.fill .rk-side > .card { flex: none; }
  .rk-body.fill .rk-side > .card.grow, .rk-body.fill .rk-side > .rk-ins, .rk-body.fill .rk-side > .rk-tk { flex: 1 1 auto; }
  .rk-body.fill .rk-list { flex: 1 1 0; overflow: clip; }
  .rk-body.fill .tl-chart { position: relative; flex: 1 1 0; height: auto; min-height: 176px; }
  .rk-body.fill .tl-chart > svg { position: absolute; inset: 0; }
  .rk-body.fill .mp-chart { flex: 1 1 0; height: auto; min-height: 240px; }
  .tf-list.fit-list { --fit-row: 37px; }
}

/* Provedores: "Quem usa" (rotas da equipe e exceções que apontam para o provedor) */
.pv-uses { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6.5px; }
.pv-use { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 6.5px; align-items: start; }
.pv-use > .prov-mark, .pv-use > .model-mark { margin-top: 1px; }
.pv-use-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.pv-use-txt b { font-size: 11.5px; font-weight: 600; }
.pv-use-txt small { font-size: 11px; color: var(--ink-3); }
.pv-sec { display: flex; flex-direction: column; gap: 6.5px; padding-top: 9.5px; border-top: 1px solid var(--line-2); }
.pv-sec > .kpi-label { font-size: 11px; }
/* Provedores A: o rendimento fica no pé do cartão e as medições crescem com a altura que sobrar */
.pv-y { display: flex; flex-direction: column; gap: 5px; margin-top: auto; }
.pv-y > .pv-yield { margin-top: 0; }
.pv-spark { height: 96px; margin-top: 2px; }
@media (min-width: 761px) and (min-height: 420px) {
  .pv-grid.fill { grid-auto-rows: minmax(auto, 1fr); align-content: stretch; }
  .pv-grid.fill > .pv { min-height: 0; }
  .pv-grid.fill .pv-y { flex: 1 1 auto; justify-content: flex-end; }
  .pv-grid.fill .pv-spark { flex: 1 1 0; height: auto; min-height: 45px; max-height: 240px; }
  /* Provedores B: o cartão do detalhe vai até o fim da tela; o rendimento fica numa coluna e as medições esticam */
  .pv-md.fill > .pv-detail { flex: 1 1 auto; display: flex; flex-direction: column; }
  .pv-cols.two { flex: 1 1 auto; }
  .pv-ycol, .pv-ycol > .y-sec, .pv-ycol > .y-sec > .stack { display: flex; flex-direction: column; }
  .pv-ycol { min-height: 100%; }
  .pv-ycol > .y-sec, .pv-ycol > .y-sec > .stack { flex: 1 1 auto; }
  .pv-ycol .y-evo { flex: 1 1 auto; }
  .pv-ycol .y-evo .spark { flex: 1 1 0; height: auto; min-height: 51px; max-height: 256px; }
}
.pv-cols.two { columns: auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22.5px; align-items: stretch; }
.pv-col { display: flex; flex-direction: column; gap: 14.5px; min-width: 0; }
.pv-col > .dev-sec { border-top: 0; padding-top: 0; }
@media (max-width: 760px) { .pv-cols.two { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 761px) and (min-height: 420px) { @container content (max-width: 820px) { .pv-cols.two { grid-template-columns: minmax(0, 1fr); } } }
.pv-cols.two > * { margin-bottom: 0; }
/* Modelos A: padrão da equipe à esquerda; exceções e últimas mudanças à direita, que vão até o fim da tela */
.mo-side { display: flex; flex-direction: column; gap: var(--gap, 13px); min-width: 0; }
@media (min-width: 761px) and (min-height: 420px) {
  .mo-layout.fill > .mo-side { align-self: stretch; }
  .mo-side > .mo-ex { flex: none; }
  .mo-side > .mg-hist { flex: 1 1 auto; }
  @container content (max-width: 980px) { .mo-layout.fill { grid-template-rows: none; } }
}
@media (max-width: 760px) { .mo-side { gap: 9.5px; } }

/* Ao vivo B: a última hora numa linha do tempo, uma faixa por pessoa */
.lv-head-b { grid-template-columns: minmax(0, 1fr); gap: 8px; }
.lv-head-b .lv-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lv-tl { display: flex; flex-direction: column; }
.lv-tl > .card-head { margin-bottom: 3px; }
.tlv { --tlv-lab: 176px; --tlv-h: 17.5px; --tlv-gap: 13px; position: relative; display: flex; flex-direction: column; }
.tlv-row { display: grid; grid-template-columns: var(--tlv-lab) minmax(0, 1fr); align-items: center; column-gap: var(--tlv-gap); padding: 7px 0; border-top: 1px solid var(--line-2); }
.tlv-tok { border-top: 0; padding: 0 0 5px; align-items: end; }
.tlv-tok .tlv-label { align-self: end; padding-bottom: 2px; }
.tlv-axis { padding: 3px 0 0; }
.tlv-label { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tlv-label .two { min-width: 0; }
.tlv-label .two > span { font-weight: 600; font-size: 12px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tlv-label .two small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tlv-track { position: relative; height: calc(var(--tracks, 1) * var(--tlv-h)); }
.tlv-tok .tlv-track { height: 45px; }
.tlv-min { position: absolute; bottom: 0; width: calc(100% / 60 - 2px); border-radius: 2.5px 2.5px 0 0; background: color-mix(in srgb, var(--s1) 50%, var(--soft)); }
.tlv-min.now, .tlv-min:hover { background: var(--s1); }
.tlv-bar { position: absolute; height: calc(var(--tlv-h) - 5px); margin-top: 2.5px; border: 0; border-radius: 5px; padding: 0; background: var(--s1); cursor: pointer; }
.tlv-bar:hover { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px color-mix(in srgb, var(--s1) 45%, transparent); z-index: 1; }
.tlv-bar.run { background: var(--good); animation: tlv-pulse 1.6s ease-in-out infinite; }
.tlv-bar.warn { background: var(--warn); }
.tlv-bar.bad { background: var(--bad); }
.tlv-bar.auto { background: var(--soft-2); }
.tlv-bar.on { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink); z-index: 2; }
@keyframes tlv-pulse { 50% { opacity: .6; } }
@media (prefers-reduced-motion: reduce) { .tlv-bar.run { animation: none; } }
.tlv-axis .tlv-track { height: 14.5px; }
.tlv-axis span { position: absolute; top: 0; transform: translateX(-50%); font-size: 10.5px; color: var(--ink-3); white-space: nowrap; }
.tlv-axis span.end { right: 0; transform: none; }
.tlv-grid { position: absolute; top: 0; bottom: 17.5px; left: calc(var(--tlv-lab) + var(--tlv-gap)); right: 0; pointer-events: none; }
.tlv-grid i { position: absolute; top: 0; bottom: 0; border-left: 1px dashed var(--line); }
.tlv > .empty { padding: 25.5px 9.5px; }
.tlv-pick { display: flex; flex-direction: column; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 11px; }
.tlv-pick-head { display: grid; grid-template-columns: 41.5px minmax(120px, 152px) minmax(0, 1fr) auto auto 61px; align-items: center; gap: 13px; padding-bottom: 8px; }
.tlv-pick-head .pd-main { min-width: 0; }
.tlv-pick-head .pd-asked { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.tlv-pick-head .num { text-align: right; }
.tlv-dur { font-weight: 600; }
.tlv-pick > .empty { padding: 19px 9.5px; }
@media (min-width: 761px) and (min-height: 420px) {
  .lv-tl.fill { min-height: auto; }
  @container content (max-width: 1100px) { .tlv-pick-head { grid-template-columns: 41.5px minmax(0, 1fr) auto 61px; } .tlv-pick-head .who-cell, .tlv-pick-head .pairs { display: none; } }
  @container content (max-width: 820px) { .tlv { --tlv-lab: 120px; } }
}
@media (max-width: 760px) {
  .lv-head-b .lv-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tlv { --tlv-lab: 73.5px; --tlv-gap: 6.5px; }
  .tlv-label .avatar { display: none; }
  .tlv-tok .tlv-label .kpi-label { font-size: 10px; }
  .tlv-pick-head { grid-template-columns: minmax(0, 1fr) auto; }
  .tlv-pick-head .c-when, .tlv-pick-head .who-cell, .tlv-pick-head .pairs, .tlv-pick-head > .num:not(.tlv-dur) { display: none; }
}
/* Ao vivo B: números e avisos numa faixa só */
@media (min-width: 761px) {
  .lv-head-b { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 22.5px; padding: 9.5px 14.5px; }
  .lv-head-b .lv-stats { display: flex; gap: 29px; }
  .lv-head-b .lv-stats .kpi-num { font-size: 21.5px; }
  .lv-head-b .lv-alerts { grid-column: auto; border-top: 0; padding-top: 0; margin-left: auto; justify-content: flex-end; }
}
@media (min-width: 761px) and (min-height: 420px) { .tlv-tok .tlv-track { height: clamp(38.5px, 9cqh, 96px); } }
@media (max-width: 760px) { .tlv-axis span.end, .tlv-axis span:nth-child(even) { display: none; } }

/* Fluxo (Ao vivo): pessoas → gateway → modelos; as linhas têm a altura de --fl-row, que o desenho também usa */
.lv-flow { --fl-row: 34px; padding: 11px 14.5px 8px; }
.lv-flow > .card-head { margin-bottom: 3px; }
.fl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(96px, 2.2fr) minmax(0, 1.1fr); align-items: center; }
.fl-col { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.fl-node { display: flex; align-items: center; gap: 7px; height: var(--fl-row); min-width: 0; padding: 0 7px; border: 0; border-radius: 8px; background: none; text-align: left; font-size: 11.5px; transition: background .15s; }
.fl-from .fl-node { flex-direction: row-reverse; text-align: right; }
button.fl-node:hover, .fl-node[aria-pressed="true"] { background: var(--hover); }
.fl-node[aria-pressed="true"] b { color: var(--accent); }
.fl-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.fl-txt b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-txt small { color: var(--ink-3); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-run { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--mode); animation: blink 1.2s ease-in-out infinite; }
.fl-mid { position: relative; min-width: 0; }
.fl-fx { position: absolute; inset: 0; pointer-events: none; }
.fl-svg { display: block; width: 100%; height: auto; overflow: visible; }
.fl-link { fill: none; stroke: color-mix(in srgb, var(--mode) 30%, var(--line)); stroke-linecap: round; transition: opacity .2s, stroke .2s; }
.fl-link.by { stroke-dasharray: 2 5; }
.fl-svg.hl .fl-link:not(.on) { opacity: .2; }
.fl-svg.hl .fl-link.on { stroke: color-mix(in srgb, var(--mode) 60%, var(--line)); }
.fl-dot { position: absolute; left: 0; top: 0; border-radius: 50%; background: var(--mode); box-shadow: 0 0 0 2px color-mix(in srgb, var(--mode) 22%, transparent); will-change: transform, opacity; }
.fl-dot.fl-bad { --mode: var(--bad); }
.fl-box { fill: var(--card); stroke: var(--line); stroke-width: 1.5; }
.fl-ring { fill: none; stroke: var(--accent); stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center; }
.fl-hub text { fill: var(--ink); font: 600 10.5px var(--font); }
.fl-hub text.sub { fill: var(--ink-3); font-weight: 500; font-size: 9.5px; }
.fl-legend { display: flex; flex-wrap: wrap; gap: 3px 11px; font-size: 11px; color: var(--ink-2); }
.fl-legend span { display: inline-flex; align-items: center; gap: 5px; }
.fl-legend i { width: 7px; height: 7px; border-radius: 50%; background: var(--mode); }
.fl-empty .empty { padding: 13px 9.5px; }
@media (min-width: 761px) and (min-height: 420px) {
  #v-aovivo { grid-template-rows: auto auto minmax(0, 1fr); }
  @container content (max-height: 720px) { .lv-flow { --fl-row: 25px; padding-top: 8px; } .lv-flow .fl-txt small { display: none; } }
  @container content (max-height: 540px) { .lv-flow { display: none; } #v-aovivo { grid-template-rows: auto minmax(0, 1fr); } }
}
@media (max-width: 640px) {
  .fl { grid-template-columns: minmax(0, 1fr) 92px minmax(0, 1.15fr); }
  .fl-node { padding: 0 4px; gap: 5px; }
  .fl-to .prov-mark { display: none; }
}

/* ================================================================ v10: Ranking com TTFT e velocidade de verdade */
.rk-cell { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; line-height: 1.25; }
.rk-cell > small { font-size: 10px; font-weight: 400; color: var(--ink-3); white-space: nowrap; }
.rk-cell.on > small { font-size: 10.5px; }
.rk-cell .nr { color: var(--ink-3); font-weight: 450; font-size: 11px; }
.rk-sp { justify-content: flex-start; }
/* quanto varia */
.sp-legend { display: flex; gap: 13px; font-size: 10.5px; margin: -2px 0 4px; }
.sp-legend > span { display: inline-flex; align-items: center; gap: 5px; }
.sp-mid-key { width: 2.5px; height: 10px; border-radius: 2px; background: var(--ink); display: inline-block; }
.sp-range-key { width: 18px; height: 7px; border-radius: 999px; background: var(--accent); opacity: .35; display: inline-block; }
.sp-list { list-style: none; margin: 0 -5px; padding: 0; display: flex; flex-direction: column; }
.sp-row { width: 100%; display: grid; grid-template-columns: 16px minmax(84px, 1.1fr) minmax(48px, 1.2fr) auto; align-items: center; gap: 8px; padding: 5px; border: 0; background: none; border-radius: 8px; text-align: left; font: inherit; font-size: 12px; color: var(--ink); }
.sp-row:hover { background: var(--hover); }
.sp-row.weak { color: var(--ink-3); }
.sp-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-track { position: relative; height: 14px; }
.sp-track::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line-2); }
.sp-range { position: absolute; top: 3.5px; height: 7px; border-radius: 999px; background: var(--accent); opacity: .35; }
.sp-mid { position: absolute; top: 1px; width: 2.5px; height: 12px; margin-left: -1.25px; border-radius: 2px; background: var(--ink); }
.sp-v { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sp-v b { font-weight: 650; font-size: 12px; }
.sp-v small { font-size: 10px; color: var(--ink-3); }
.sp-v small::before { content: 'até '; }
/* bloco do dia/hora */
.bk-row { grid-template-columns: 16px minmax(0, 1fr) 46px 54px 46px; }
.bk-head { padding-top: 6px; padding-bottom: 0; font-size: 10px; color: var(--ink-3); }
.bk-head:hover { background: none; }
/* mapa */
.mp-strip { fill: var(--soft); stroke: var(--line-2); }
/* detalhe */
.rk-bhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.rk-bhead .seg { transform: scale(.92); transform-origin: right center; }
.rk-whisk { stroke: var(--accent); stroke-width: 1.5; opacity: .45; }
.rk-bar-r.weak { opacity: .45; }
.rk-tbl tr[data-tip] { cursor: default; }
@media (max-width: 760px) {
  .bk-row { grid-template-columns: 16px minmax(0, 1fr) 46px 54px; }
  .bk-row > .bk-v:last-child { display: none; }
  .sp-row { grid-template-columns: 16px minmax(0, 1fr) minmax(40px, 1fr) auto; }
}
@media (min-width: 761px) and (min-height: 420px) {
  .rk-body.fill .rk-side > .rk-ins { flex: none; }
  .rk-body.fill .rk-side > .rk-bk { flex: 1 1 auto; }
  .bk-list.fit-list { --fit-row: 31px; }
  .rk-tk .qt-list.fit-list, .rk-spr .sp-list.fit-list { --fit-row: 37px; --fit-min: 2; }
}
/* ================================================================ v10: Provedores — as duas janelas, sem leitura vencida */
.pv-wins { display: flex; flex-direction: column; gap: 3px; }
.pv-win { display: grid; grid-template-columns: 52px minmax(40px, 1fr) 34px minmax(0, auto); align-items: center; gap: 6.5px; font-size: 11px; min-width: 0; }
.pv-win-name { color: var(--ink-2); white-space: nowrap; }
.pv-win b { font-weight: 650; text-align: right; font-variant-numeric: tabular-nums; }
.pv-win small { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-win small:not(:empty):not(.renewed)::before { content: 'renova '; }
.pv-win small.renewed { white-space: normal; overflow: visible; text-overflow: clip; } /* "renovou às HH:MM · estimado" não leva o "renova " e não é cortado */
.pv-acct.old .pv-win { opacity: .75; }
.pv-note { display: flex; align-items: flex-start; gap: 6.5px; margin: 0; padding: 6.5px 8px; border-radius: 8px; background: var(--warn-soft); color: var(--warn-ink); font-size: 11px; line-height: 1.35; }
.pv-note .ic { width: 12px; height: 12px; flex: none; margin-top: 1px; }
.drawer .pv-note, .pv-detail .pv-note { margin-bottom: 6.5px; }
/* ================================================================ v10: pedido aberto = pedido e resposta; turnos em "Detalhes técnicos" */
:root { --main-c: var(--accent); --sub-c: #8b5cf6; }
.pd-box { gap: 6.5px; padding: 9.5px; }
.pd-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 9.5px; }
.pd-col { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 8px 11px; border-radius: 9.5px; background: var(--soft); border-left: 3px solid var(--line); }
.pd-col.asked { border-left-color: var(--ink-3); }
.pd-col.said { border-left-color: var(--main-c); }
.pd-col.said.now { border-left-color: var(--run, var(--good)); }
.pd-col.said.bad { border-left-color: var(--bad); }
.pd-label { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; font-size: 10.5px; font-weight: 650; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-2); }
.pd-label small { font-weight: 450; letter-spacing: 0; text-transform: none; color: var(--ink-3); font-size: 11px; }
.pd-label .tag.tiny { text-transform: none; letter-spacing: 0; font-weight: 500; }
.pd-label .tag.tiny .ic { width: 10px; height: 10px; }
.pd-text { font-size: 12.5px; line-height: 1.5; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.pd-text.muted { color: var(--ink-3); font-size: 12px; }
.pd-text.full { max-width: 80ch; }
.pd-col .clip-btn { align-self: flex-start; }
.pd-col .pd-sub { font-size: 12px; }
.pd-read { align-self: flex-start; font-size: 11.5px; }
.pd-read .ic { width: 12px; height: 12px; }
.pd-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 14.5px; padding: 0 3px; justify-content: flex-start; }
.pd-meta { font-size: 11.5px; margin-right: auto; }
.pd-tech-btn[aria-expanded="true"] { color: var(--ink); font-weight: 600; }
.pt-wrap { display: flex; flex-direction: column; gap: 3px; border-top: 1px solid var(--line-2); padding-top: 6.5px; }
.pt-legend { display: flex; flex-wrap: wrap; gap: 3px 13px; font-size: 10.5px; padding: 0 6.5px 2px; }
.pt-legend > span { display: inline-flex; align-items: center; gap: 5px; }
.pt-dot { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.pt-dot.pr-main { background: var(--main-c); } .pt-dot.pr-sub { background: var(--sub-c); }
.pt-wrap .pt { border-left: 3px solid var(--main-c); border-radius: 2px 8px 8px 2px; }
.pt-wrap .pt.is-sub { border-left-color: var(--sub-c); background: color-mix(in srgb, var(--sub-c) 6%, transparent); }
.pt-wrap .pt-btn { grid-template-columns: 40px 64px 168px minmax(0, 1fr) 64px 48px; }
.pt-wrap .pt-btn.one { grid-template-columns: 40px 64px minmax(0, 1fr) 64px 48px; }
.pt-role { justify-self: start; font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 999px; white-space: nowrap; }
.pt-role.pr-main { color: var(--main-c); background: color-mix(in srgb, var(--main-c) 12%, transparent); }
.pt-role.pr-sub { color: var(--sub-c); background: color-mix(in srgb, var(--sub-c) 14%, transparent); }
.pt-more { align-self: center; margin-top: 3px; }
@container content (max-width: 900px) {
  .pd-cols { grid-template-columns: minmax(0, 1fr); }
  .pt-wrap .pt-btn { grid-template-columns: 35px 58px 144px minmax(0, 1fr) 61px; }
  .pt-wrap .pt-btn.one { grid-template-columns: 35px 58px minmax(0, 1fr) 61px; }
}
@media (max-width: 760px) {
  .pd-cols { grid-template-columns: minmax(0, 1fr); }
  .pt-wrap .pt-btn, .pt-wrap .pt-btn.one { grid-template-columns: 35px minmax(0, 1fr) auto; }
  .pt-wrap .pt-role { grid-column: 2; grid-row: 1; }
  .pt-wrap .pt-btn .pair { display: none; }
  .pt-wrap .pt-what { grid-column: 1 / -1; grid-row: 2; }
  .pt-wrap .pt-tok { grid-column: 3; grid-row: 1; }
}
/* Ao vivo: erros num número só, com o link das 24 h */
.lv-err-link { display: inline-flex; align-items: center; gap: 2px; font-size: 11px; padding: 0; height: auto; color: var(--bad-ink); align-self: flex-start; }
.lv-err-link .ic { width: 11px; height: 11px; }
/* Atividade B: "Todas as pessoas" no topo da lista */
.avatar.all { background: var(--soft-2); color: var(--ink-2); display: grid; place-items: center; }
.avatar.all .ic { width: 12px; height: 12px; }
.side-ppl > li:first-child { border-bottom: 1px solid var(--line-2); padding-bottom: 3px; margin-bottom: 3px; }
.acts.pds .pd-sub > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.acts.pds .pd-sub { flex-wrap: nowrap; }
/* notebook (área útil ~1366×600): o Painel A cabe sem rolar */
@media (min-width: 761px) and (min-height: 420px) { @container content (max-height: 560px) { .pn-body.fill > .pn-side { gap: 7px; } } }
.bk-row.no-tps { grid-template-columns: 16px minmax(0, 1fr) 54px 54px; }

/* ================================================================ conversas: pedido → resposta final */
.cv-md { display: grid; grid-template-columns: minmax(250px, 330px) minmax(0, 1fr); gap: var(--gap, 13px); align-items: start; }
.cv-side { display: flex; flex-direction: column; gap: 6.5px; padding: 11px 8px; }
.cv-side .search-wrap { margin: 0 3px; }
.cv-count { padding: 0 6.5px; min-height: 16px; }
.cv-list { min-height: 0; }
.cv-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.cv-item { width: 100%; display: grid; grid-template-columns: 19px minmax(0, 1fr); gap: 8px; align-items: start; padding: 8px 6.5px; border: 0; border-radius: 9.5px; background: transparent; text-align: left; font: inherit; color: var(--ink); transition: background-color .12s ease; }
.cv-item:hover { background: var(--hover); }
.cv-item.on { background: var(--soft-2); }
.cv-item .avatar { margin-top: 1px; }
.cv-item-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cv-item-top { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.cv-item-top b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-item-top small { font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-when { margin-left: auto; flex: none; }
.cv-item-ask { font-size: 11.5px; line-height: 1.4; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.cv-item-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 6px; font-size: 10.5px; color: var(--ink-3); }
.cv-item-sub .tag.tiny, .cv-label .tag.tiny { margin-left: 0; }
.cv-main { padding: 0; min-height: 280px; }
.cv-main > .empty, .cv-main > .skel-wrap { padding: 25.5px 16px; }
.cv-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 11px 16px; background: var(--card); border-bottom: 1px solid var(--line); border-radius: 14.5px 14.5px 0 0; }
.cv-head-who { display: flex; align-items: center; gap: 9.5px; min-width: 0; }
.cv-head-who > div { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.cv-head-who b { font-weight: 650; font-size: 13.5px; }
.cv-head-act { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cv-head-act .tag.tiny { margin-left: 0; }
.cv-skel .skel { height: 52px; margin: 6.5px; border-radius: 9.5px; }
.chip.arch { padding-right: 3px; gap: 6px; color: var(--ink-2); }
.chip.arch.on { background: var(--warn-soft); color: var(--ink); }
.chip.arch .ic { width: 12px; height: 12px; }
@media (min-width: 761px) and (min-height: 420px) {
  /* lista e conversa rolam cada uma por si: as duas são longas */
  .cv-side { position: sticky; top: 0; max-height: calc(100cqh - 15px); }
  .cv-list { flex: 1; overflow-y: auto; overscroll-behavior: contain; margin: 0 -3px; padding: 0 3px; }
}
@container content (max-width: 860px) { .cv-md { grid-template-columns: minmax(0, 1fr); } .cv-side { position: static; max-height: 46vh; } }
@media (max-width: 760px) { .cv-md { grid-template-columns: minmax(0, 1fr); } .cv-list { max-height: 46vh; overflow-y: auto; } .cv-ask { max-width: 96%; } }
/* rendimento do plano: o mesmo 1% contado como um tipo só de token */
.y-eq { display: flex; flex-direction: column; gap: 6.5px; padding: 11px 13px; border-radius: 13px; border: 1px solid var(--line); }
.y-eq .kpi-label { display: inline-flex; align-items: center; gap: 4px; }
.y-eq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px 13px; }
.y-eq-grid span { display: flex; flex-direction: column; }
.y-eq-grid b { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.y-eq-grid small { font-size: 11px; color: var(--ink-2); }
.y-eq .warn-ink { color: var(--warn-ink); }
.pv-yield .tag.tiny { margin-left: 5px; }
/* esforço máximo: principal × subagentes num quadro só */
.eff-card .eff-lead { margin: -3px 0 9.5px; max-width: 760px; }
.eff-tbl th[scope="row"] { font-weight: 500; }
.eff-tbl td, .eff-tbl th { vertical-align: top; }
.eff-tbl td > small, .eff-tbl td > .eff-ro + small { display: block; margin-top: 3px; font-size: 10.5px; }
.eff-tbl .dd { min-width: 150px; }
.tbl-wrap { overflow-x: auto; }
.eff-ro { font-weight: 600; }
.eff-all th, .eff-all td { background: var(--soft); }
.ch-group { padding: 8px 6.5px 2px; font-size: 10.5px; font-weight: 600; color: var(--ink-3); }
.ch-src > .ch-group:first-child { padding-top: 0; }
.ch-default { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding-bottom: 9.5px; border-bottom: 1px solid var(--line-2); }
.ch-default small { font-size: 11px; line-height: 1.45; }
.ctx-adv > summary { cursor: pointer; font-size: 11.5px; color: var(--ink-2); }
.ctx-adv[open] > summary { margin-bottom: 6px; }
.pf-lead { margin: -3px 0 9.5px; }

/* perfis */
.pf-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.pf-tile { display: flex; flex-direction: column; gap: 6px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.pf-tile.on { border-color: var(--good, #2f9e5b); background: color-mix(in srgb, var(--good, #2f9e5b) 7%, transparent); }
.pf-top { display: flex; align-items: center; gap: 4px; min-height: 26px; }
.pf-top .pf-acts { margin-left: auto; }
.pf-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: auto; }
.pf-chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px 0 4px; border-radius: 999px; background: var(--soft); font-size: 11.5px; min-width: 0; }
.pf-chip small { color: var(--ink-3, var(--ink-2)); font-size: 10.5px; }
.pf-chip b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-chip.edit { border: 0; font-family: inherit; color: inherit; cursor: pointer; }
.pf-chip.edit:hover { background: var(--hover); }
.pf-chip.edit:focus-visible { outline: 2px solid var(--accent, currentColor); outline-offset: 1px; }
.bc-card { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.bc-lead { margin: 0; }
.bc-scroll { overflow-x: auto; }
.bc-t { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.bc-t th { text-align: left; font-weight: 500; color: var(--ink-2); font-size: 11.5px; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.bc-t td { padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.bc-t .num { text-align: right; }
.bc-t tr.weak td { opacity: .55; }
.bc-pos { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.bc-pos.top1 { background: #c9a227; color: #fff; } .bc-pos.top2 { background: #8f9aa6; color: #fff; } .bc-pos.top3 { background: #b07a4f; color: #fff; }
.bc-who { display: inline-flex; align-items: center; gap: 7px; }
.bc-score { display: inline-flex; align-items: center; gap: 7px; }
.bc-bar { width: 90px; height: 6px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.bc-bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent, #6a7cff); }
.bc-bar.good i { background: var(--good, #2f9e5b); } .bc-bar.bad i { background: var(--bad, #d0543a); }
.bad-ink { color: var(--bad-ink); }
@media (max-width: 560px) { .bc-bar { width: 48px; } }
.pf-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.pf-row.on { border-color: var(--good, #2f9e5b); background: color-mix(in srgb, var(--good, #2f9e5b) 7%, transparent); }
.pf-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.pf-main b { display: flex; align-items: center; gap: 6px; }
.pf-sum { font-size: 11px; }
.pf-acts { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.pf-auto { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.pf-rule { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.pf-rule.dim > span { opacity: .55; }

/* Ranking: teste medido (bench/latest.json) */
.rk-synth-t { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.rk-synth-t th, .rk-synth-t td { padding: 5px 4px; text-align: right; border-top: 1px solid var(--line); }
.rk-synth-t th:first-child, .rk-synth-t td:first-child { text-align: left; }
.rk-synth-t th { color: var(--muted); font-weight: 500; border-top: 0; }

/* ================================================================ Conversas: leitura como no app do Claude
 * Pedido num balão à direita; resposta em texto corrido de leitura, com a marca do Claudex; copiar embaixo de cada um.
 * Entrada das trocas em sequência, "Mostrar tudo" com a altura animada, retorno do copiar no próprio botão. */
.cv-thread { list-style: none; margin: 0; padding: 18px 20px 26px; display: flex; flex-direction: column; gap: 30px; }
.cv-x { display: flex; flex-direction: column; gap: 14px; }
.cv-ask { align-self: flex-end; max-width: min(720px, 86%); display: flex; flex-direction: column; align-items: flex-end; gap: 5px; animation: cv-ask-in 440ms var(--ease-out) both; animation-delay: calc(var(--d, 0) * 60ms); }
.cv-ask .cv-label { justify-content: flex-end; padding-right: 4px; }
.cv-bubble { max-width: 100%; display: flex; flex-direction: column; gap: 8px; padding: 10px 15px; border-radius: 18px 18px 6px 18px; background: var(--soft); transition: background-color .2s ease, box-shadow .2s ease; }
.cv-ask:hover .cv-bubble { box-shadow: 0 0 0 1px var(--line); }
.cv-ask-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cv-x.f-correction .cv-bubble { background: var(--warn-soft); }
.cv-ans { max-width: min(780px, 100%); display: flex; flex-direction: column; gap: 9px; animation: cv-ans-in 520ms var(--ease-out) both; animation-delay: calc(var(--d, 0) * 60ms + 110ms); }
.cv-ans.e-error .cv-text { color: var(--bad-ink); }
.cv-label { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 7px; font-size: 11px; color: var(--ink-2); }
.cv-label b { font-weight: 650; color: var(--ink); }
.cv-n { min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 10px; display: inline-grid; place-items: center; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.logo.cv-logo { width: 21px; height: 21px; border-radius: 7px; }
.logo.cv-logo .logo-ic { width: 12.5px; height: 12.5px; }
.cv-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.6; color: var(--ink); }
.cv-text.mono-ish { font-family: var(--mono); font-size: 11.5px; line-height: 1.55; color: var(--ink-2); }
.cv-acts { display: flex; align-items: center; gap: 4px; min-height: 26px; }
.cv-ask .cv-acts { margin-right: 2px; opacity: 0; transform: translateY(-4px); transition: opacity .2s ease, transform .2s var(--ease-out); }
.cv-ask:hover .cv-acts, .cv-ask:focus-within .cv-acts { opacity: 1; transform: none; }
@media (hover: none) { .cv-ask .cv-acts { opacity: 1; transform: none; } }
.cv-work { flex-wrap: wrap; gap: 4px 8px; margin-top: 2px; padding-top: 9px; border-top: 1px dashed var(--line); font-size: 11px; }
.cv-work-sum { flex: 1; min-width: 0; }
@media (max-width: 560px) { .cv-work-sum { order: 3; flex-basis: 100%; } .cv-work > .link-btn { margin-left: auto; } }
.cv-older { margin-bottom: 3px; }

/* texto longo: altura limitada com esmaecimento; o botão abre e fecha com a altura animada */
.cv-clip { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; max-width: 100%; }
.cv-ask .cv-clip { align-items: stretch; }
.cv-body { min-width: 0; max-width: 100%; }
.cv-body.clipped { max-height: 440px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 calc(100% - 96px), transparent); mask-image: linear-gradient(#000 calc(100% - 96px), transparent); }
.cv-bubble .cv-body.clipped { max-height: 240px; }
.cv-body.is-moving, .cv-text.is-moving { overflow: hidden; }
.cv-expand { display: inline-flex; align-items: center; gap: 5px; height: 27px; padding: 0 11px 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink-2); font-size: 11.5px; font-weight: 550; transition: background .15s, color .15s, border-color .15s, transform .12s; }
.cv-expand:hover { color: var(--ink); background: var(--soft); }
.cv-expand:active { transform: scale(.97); }
.cv-expand .ic { width: 12.5px; height: 12.5px; transition: transform .3s var(--ease-out); }
.cv-expand[aria-expanded="true"] .ic { transform: rotate(180deg); }
.cv-bubble .cv-expand { background: transparent; }

/* colado e contexto do hook: recolhidos, abrem deslizando */
.cv-paste { interpolate-size: allow-keywords; border-top: 1px dashed var(--line-strong, var(--line)); padding-top: 6px; font-size: 11.5px; }
.cv-paste summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 3px 6px; margin: 0 -6px; border-radius: 8px; color: var(--ink-2); font-weight: 550; transition: background .15s, color .15s; }
.cv-paste summary::-webkit-details-marker { display: none; }
.cv-paste summary:hover { color: var(--ink); background: var(--hover); }
.cv-paste summary small { color: var(--ink-3); font-weight: 450; white-space: nowrap; }
.cv-paste summary .ic { width: 12.5px; height: 12.5px; }
.cv-paste summary .cv-chev { margin-left: auto; transition: transform .3s var(--ease-out); }
.cv-paste[open] summary .cv-chev { transform: rotate(180deg); }
.cv-paste::details-content { block-size: 0; overflow: hidden; transition: block-size .34s var(--ease-out), content-visibility .34s allow-discrete; }
.cv-paste[open]::details-content { block-size: auto; }
.cv-fold { padding: 7px 0 2px; }
.cv-hook summary { color: var(--ink-3); }

/* copiar: o ícone vira ✓ e o texto vira "Copiado" */
.md-copy { display: inline-flex; align-items: center; gap: 5px; height: 26px; min-width: 26px; padding: 0 6px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-3); font: 550 11.5px/1 var(--font); justify-content: center; transition: background .15s, color .2s, transform .12s; }
.md-copy:hover { background: var(--hover); color: var(--ink); }
.md-copy:active { transform: scale(.92); }
.md-copy.has-text { padding: 0 9px 0 7px; }
.md-copy-ic { display: grid; width: 14px; height: 14px; }
.md-copy-ic .ic { grid-area: 1 / 1; width: 14px; height: 14px; transition: opacity .18s ease, transform .32s var(--ease-spring); }
.md-copy .c-ok { opacity: 0; transform: scale(.3) rotate(-25deg); stroke-width: 2.4; }
.md-copy.done { color: var(--good-ink); animation: md-pop 380ms var(--ease-spring); }
.md-copy.done .c-copy { opacity: 0; transform: scale(.3) rotate(20deg); }
.md-copy.done .c-ok { opacity: 1; transform: none; }
.md-copy-t { min-width: 3.4em; text-align: left; }
.sr-copy { position: fixed; left: -9999px; top: 0; opacity: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- Markdown */
.md { font-size: 14px; line-height: 1.7; color: var(--ink); overflow-wrap: break-word; font-feature-settings: "tnum" 0; }
.cv-bubble .md { font-size: 13.5px; line-height: 1.6; }
.md > * { margin: 0; }
.md > * + * { margin-top: .85em; }
.md strong { font-weight: 650; }
.md em { font-style: italic; }
.md del { color: var(--ink-3); }
.md a { color: var(--accent); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); text-underline-offset: 2.5px; text-decoration-thickness: 1px; transition: text-decoration-color .15s; }
.md a:hover { text-decoration-color: var(--accent); }
.md :not(pre) > code { font-family: var(--mono); font-size: .84em; padding: .12em .4em; border-radius: 5px; background: var(--code-bg); border: 1px solid var(--line-2); color: var(--code-ink); white-space: break-spaces; }
.md-h { font-weight: 650; line-height: 1.3; letter-spacing: -.01em; color: var(--ink); text-wrap: balance; }
.md > .md-h { margin-top: 1.45em; }
.md > .md-h:first-child { margin-top: 0; }
.md > .md-h + * { margin-top: .5em; }
.md-h1 { font-size: 1.45em; letter-spacing: -.02em; }
.md-h2 { font-size: 1.24em; }
.md-h3 { font-size: 1.09em; }
.md-h4 { font-size: 1em; }
.md-h5, .md-h6 { font-size: .8em; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }
.md ul, .md ol { padding-left: 1.55em; }
.md ul { list-style-type: disc; }
.md :is(ul, ol) ul { list-style-type: circle; }
.md :is(ul, ol) :is(ul, ol) ul { list-style-type: square; }
.md li + li { margin-top: .32em; }
.md li > ul, .md li > ol, .md li > p, .md li > blockquote, .md li > .md-code, .md li > .md-table { margin-top: .32em; }
.md li::marker { color: var(--ink-3); }
.md ol > li::marker { font-variant-numeric: tabular-nums; font-weight: 550; }
.md ul.md-tasks { list-style: none; padding-left: .15em; }
.md-task { display: flex; align-items: flex-start; gap: .55em; }
.md-box { flex: none; width: 15px; height: 15px; margin-top: .3em; border-radius: 4.5px; box-shadow: inset 0 0 0 1.5px var(--ink-3); display: grid; place-items: center; }
.md-box .ic { width: 11px; height: 11px; stroke: #fff; stroke-width: 2.8; }
.md-task.done .md-box { background: var(--good); box-shadow: none; }
.md-task.done { color: var(--ink-2); }
.md blockquote { padding: .1em 0 .1em 1em; border-left: 3px solid var(--soft-2); color: var(--ink-2); }
.md blockquote .md { font-size: 1em; color: inherit; }
.md hr { height: 0; border: 0; border-top: 1px solid var(--line); margin: 1.6em 0; }
.md > hr + * { margin-top: 0; }

.md-table { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.md-table:focus-visible { outline-offset: 2px; }
.md-table table { width: 100%; border-collapse: collapse; font-size: .9em; line-height: 1.5; }
.md-table th { text-align: left; font-weight: 600; font-size: .92em; color: var(--ink-2); background: var(--soft); padding: .55em .95em; border-bottom: 1px solid var(--line); white-space: nowrap; }
.md-table td { padding: .55em .95em; border-bottom: 1px solid var(--line-2); vertical-align: top; overflow-wrap: normal; word-break: normal; }
.md-table tr:last-child td { border-bottom: 0; }
.md-table tbody tr { transition: background-color .14s ease; }
@media (hover: hover) { .md-table tbody tr:hover { background: var(--hover); } }

.md-code { margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--code-bg); }
.md > .md-code { margin-top: 1em; }
.md-code-bar { display: flex; align-items: center; gap: 8px; padding: 4px 5px 4px 13px; background: var(--code-bar); border-bottom: 1px solid var(--line); font-size: 11.5px; }
.md-code-lang { font-weight: 600; color: var(--ink-2); }
.md-code-bar small { color: var(--ink-3); font-size: 10.5px; }
.md-code-bar .md-copy { margin-left: auto; }
.md-code pre { margin: 0; padding: 12px 14px; overflow-x: auto; font-family: var(--mono); font-size: 12.5px; line-height: 1.62; tab-size: 2; color: var(--ink); }
.md-code pre:focus-visible { outline-offset: -2px; }
.md-code pre code { font: inherit; white-space: pre; }
.sx-key { color: var(--sx-key); }
.sx-str { color: var(--sx-str); }
.sx-num { color: var(--sx-num); }
.sx-com { color: var(--sx-com); font-style: italic; }
.sx-fn { color: var(--sx-fn); }
.sx-prop { color: var(--sx-prop); }
.sx-ins, .sx-del { display: inline-block; min-width: calc(100% + 28px); margin: 0 -14px; padding: 0 14px; vertical-align: top; }
.sx-ins { color: var(--good-ink); background: color-mix(in srgb, var(--good) 10%, transparent); }
.sx-del { color: var(--bad-ink); background: color-mix(in srgb, var(--bad) 10%, transparent); }
.sx-meta { color: var(--accent); }

/* "✶ Insight" do estilo explicativo: destaque com a estrela e um brilho que passa uma vez */
.md-insight { position: relative; overflow: hidden; padding: 12px 15px 13px 16px; border-radius: 13px; border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent); background: linear-gradient(135deg, var(--accent-soft), color-mix(in srgb, var(--accent-soft) 35%, var(--card)) 75%); }
.md-insight::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.md-insight::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, var(--sheen) 50%, transparent 65%); transform: translateX(-100%); animation: md-sheen 1.3s .5s ease-out both; pointer-events: none; }
.md-insight-h { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; font-size: 11px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--accent); }
.md-insight-star { display: inline-block; font-size: 14px; letter-spacing: 0; animation: md-star 700ms .35s var(--ease-spring) both; }
.md-insight > .md { font-size: 1em; }

@keyframes cv-ask-in { from { opacity: 0; transform: translate(14px, 6px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes cv-ans-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes md-pop { 0% { transform: scale(.88); } 55% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes md-sheen { to { transform: translateX(100%); } }
@keyframes md-star { from { transform: rotate(-120deg) scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

/* ================================================================ O que mudou (menu do perfil)
 * Resumo com a barra das três partes e filtros; grupos com a contagem; itens numa linha do tempo que entram em sequência.
 * ✓ verde concluído (o traço se desenha), amarelo em implementação (anel girando), círculo vazio pendente. */
.cl { display: flex; flex-direction: column; gap: 20px; }
.cl-hero { display: grid; gap: 12px; padding: 16px 16px 13px; border-radius: 16px; background: var(--soft); animation: cl-in 380ms var(--ease-out) both; }
.cl-hero-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.cl-hero-n { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.cl-big { font-size: 36px; font-weight: 650; line-height: 1; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.cl-hero-n > span { color: var(--ink-2); font-size: 13px; }
.cl-pct { padding: 3px 9px; border-radius: 999px; background: var(--good-soft); color: var(--good-ink); font-size: 12.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
.cl-bar { display: flex; gap: 3px; height: 10px; }
.cl-bar > i { min-width: 6px; flex-basis: 0; border-radius: 999px; transform-origin: left center; animation: cl-grow 760ms var(--ease-out) both; animation-delay: calc(140ms + var(--k, 0) * 140ms); }
.cl-bar > .cl-done { background: var(--good); }
.cl-bar > .cl-doing { background: var(--warn); }
.cl-bar > .cl-todo { background: var(--card); box-shadow: inset 0 0 0 1.5px var(--soft-2); }
.cl-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cl-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px 0 5px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 12px; transition: border-color .15s, box-shadow .15s, transform .12s, background .15s; }
.cl-chip:hover { background: var(--bg); border-color: var(--ink-3); }
.cl-chip:active { transform: scale(.97); }
.cl-chip b { font-weight: 650; font-variant-numeric: tabular-nums; }
.cl-chip > span:last-child { color: var(--ink-2); }
.cl-chip[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.cl-chip .cl-mark { width: 19px; height: 19px; margin: 0; }
.cl-chip .cl-check { animation-delay: 300ms; }
.cl-when { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--ink-3); }
.cl-when .ic { width: 12px; height: 12px; }

.cl-group { animation: cl-in 400ms var(--ease-out) both; animation-delay: calc(180ms + var(--g, 0) * 70ms); }
.cl-group-h { display: flex; align-items: center; gap: 9px; margin-bottom: 4px; padding: 0 6px; }
.cl-group-h h3 { font-size: 12.5px; font-weight: 650; }
.cl-group-n { font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.cl-group-bar { flex: 0 0 56px; height: 4px; margin-left: auto; border-radius: 4px; background: var(--soft-2); overflow: hidden; }
.cl-group-bar > i { display: block; height: 100%; width: calc(var(--p, 0) * 100%); border-radius: inherit; background: var(--good); transform-origin: left center; animation: cl-grow 700ms var(--ease-out) both; animation-delay: calc(320ms + var(--g, 0) * 70ms); }
.cl-list { position: relative; list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.cl-list::before { content: ""; position: absolute; left: 16px; top: 16px; bottom: 16px; width: 1.5px; border-radius: 2px; background: var(--line); transform-origin: top; animation: cl-line 700ms var(--ease-out) both; animation-delay: calc(260ms + var(--g, 0) * 70ms); }
.cl-item { position: relative; display: flex; align-items: flex-start; gap: 11px; padding: 8px 8px 8px 6px; border-radius: 11px; transition: background-color .16s ease; animation: cl-item-in 440ms var(--ease-out) both; animation-delay: calc(240ms + var(--g, 0) * 70ms + var(--i, 0) * 45ms); }
@media (hover: hover) { .cl-item:hover { background: var(--hover); } }
.cl-item.cl-again { animation: cl-item-in 320ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 35ms); }
.cl-text { display: grid; gap: 2px; min-width: 0; padding-top: 1px; }
.cl-text b { font-size: 12.5px; font-weight: 600; line-height: 1.4; }
.cl-text small { font-size: 11.5px; line-height: 1.45; color: var(--ink-2); }
.cl-todo .cl-text b { color: var(--ink-2); font-weight: 550; }
.cl-mark { position: relative; z-index: 1; flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; display: grid; place-items: center; background: var(--card); }
.cl-done .cl-mark { background: var(--good); animation: cl-pop 420ms var(--ease-spring) both; animation-delay: calc(300ms + var(--g, 0) * 70ms + var(--i, 0) * 45ms); }
.cl-check { width: 13px; height: 13px; fill: none; stroke: #fff; stroke-width: 2.7; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: cl-draw 380ms var(--ease-out) forwards; animation-delay: calc(460ms + var(--g, 0) * 70ms + var(--i, 0) * 45ms); }
.cl-doing .cl-mark { background: var(--warn-soft); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--warn) 55%, transparent); }
.cl-doing .cl-mark::before { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--warn); border-right-color: var(--warn); animation: cl-spin 1.3s linear infinite; }
.cl-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); animation: cl-pulse 1.6s ease-in-out infinite; }
.cl-todo .cl-mark { box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.cl-none { padding: 6px; }
.cl-bar > .cl-ask, .cl-ask .cl-mark { background: var(--accent, #c8641e); }
.cl-q { color: #fff; font-size: 12px; line-height: 1; }
.cl-ask .cl-text b { color: var(--ink); }
.cl-tabs { display: flex; justify-content: flex-start; }
.cl-general { display: grid; gap: 6px; padding: 12px 14px; border-radius: 14px; background: var(--soft); }
.cl-general > b { font-size: 12.5px; }
.cl-talk { display: grid; gap: 4px; margin-top: 3px; }
.cl-thread:empty { display: none; }
.cl-thread { display: grid; gap: 4px; }
.cl-msg { margin: 0; padding: 6px 9px; border-radius: 9px; background: var(--soft); font-size: 11.5px; line-height: 1.45; white-space: pre-wrap; }
.cl-msg.is-agent { background: var(--hover); }
.cl-msg b { font-weight: 650; }
.cl-reply { justify-self: start; font-size: 11.5px; }
.cl-form { display: grid; gap: 6px; }
.cl-form[hidden] { display: none; }
.cl-input { width: 100%; box-sizing: border-box; resize: vertical; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); font: inherit; font-size: 12.5px; }
.cl-form .btn { justify-self: end; }
.cl-vlist { margin: 0; padding: 0 6px 0 22px; display: grid; gap: 4px; font-size: 12px; line-height: 1.45; color: var(--ink-2); }
.cl-main[hidden], .cl-ext[hidden] { display: none; }
.cl-main, .cl-ext { display: grid; gap: 14px; }
@keyframes cl-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes cl-item-in { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
@keyframes cl-grow { from { transform: scaleX(0); } to { transform: none; } }
@keyframes cl-line { from { transform: scaleY(0); } to { transform: none; } }
@keyframes cl-pop { 0% { transform: scale(.4); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes cl-draw { to { stroke-dashoffset: 0; } }
@keyframes cl-spin { to { transform: rotate(360deg); } }
@keyframes cl-pulse { 0%, 100% { transform: scale(.75); opacity: .7; } 50% { transform: scale(1); opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .cv-ask, .cv-ans, .md-copy.done, .md-insight::after, .md-insight-star, .cl-hero, .cl-bar > i, .cl-group, .cl-list::before, .cl-group-bar > i, .cl-item, .cl-done .cl-mark, .cl-check, .cl-doing .cl-mark::before, .cl-dot { animation: none !important; }
  .md-insight::after { display: none; }
  .cl-check { stroke-dashoffset: 0; }
  .cv-paste::details-content, .md-copy-ic .ic, .cv-expand .ic, .cv-ask .cv-acts { transition: none; }
}

/* celular (até 760 px): por último, para vencer as regras de desktop de mesma especificidade.
   Ao vivo: métricas em 2 colunas e o gráfico na largura toda (o .lv-head 1,5fr/1fr e o .lv-stats de 4 colunas, mais acima, anulavam a regra de 760 px).
   Topo: a barra sticky fica sólida, com filete, para o conteúdo que rola por baixo não aparecer através dela; o primeiro cartão ganha respiro. */
@media (max-width: 760px) {
  .lv-head { grid-template-columns: minmax(0, 1fr); }
  .lv-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lv-chart { border-left: 0; padding-left: 0; border-top: 1px solid var(--line-2); padding-top: 9.5px; }
  .lv-chart .chart-area { flex: none; height: 96px; }
  .top { background: var(--bg); backdrop-filter: none; box-shadow: 0 1px 0 var(--line-2); }
  #content { padding-top: 6.5px; }
  /* teto de esforço: cada modelo vira um bloco (nome em cima; principal e subagentes lado a lado, com rótulo) */
  .eff-tbl thead { display: none; }
  .eff-tbl, .eff-tbl tbody { display: block; }
  .eff-tbl tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 5px 10px; padding: 9.5px 6.5px; border-top: 1px solid var(--line-2); }
  .eff-tbl tr:first-child { border-top: 0; }
  .eff-tbl th { position: static; background: none; padding: 0; grid-column: 1 / -1; }
  .eff-tbl td { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; padding: 0; border: 0; white-space: normal; }
  .eff-tbl td:nth-of-type(1)::before { content: 'Agente principal'; }
  .eff-tbl td:nth-of-type(2)::before { content: 'Subagentes'; }
  .eff-tbl td::before { display: block; font-size: 10.5px; color: var(--ink-3); }
  .eff-tbl .dd { min-width: 0; width: 100%; }
  .eff-all td:nth-of-type(n+2) { display: none; }
  .eff-all { background: var(--soft); border-radius: 9.5px; }
  .eff-all th, .eff-all td { background: none; }
}

.ef-tile { display: flex; flex-direction: column; gap: 9px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
/* Esforço: cartões por modelo pedido (mesmo desenho dos Perfis) */
.ef-top { display: flex; align-items: center; gap: 8px; }
.ef-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ef-ctl { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ef-k { flex-shrink: 0; font-size: 11.5px; color: var(--ink-2); }
.ef-line > .ef-k { width: 72px; }
.ef-k small { font-size: 11px; }
.ef-sub { display: flex; flex-direction: column; gap: 9px; margin-top: auto; padding-top: 9px; border-top: 1px dashed var(--line); }
.ef-ro { font-size: 12.5px; font-weight: 500; }
.ef-tile .seg { display: flex; width: 100%; flex-wrap: nowrap; }
.ef-tile .seg button { flex: 1 1 0; min-width: 0; padding: 0 2px; font-size: 11.5px; white-space: nowrap; }

/* Equipe: nome do PC inteiro, situação embaixo */
.dev-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.dev-txt .dev-name { white-space: normal; overflow-wrap: anywhere; }
.dev-st { font-size: 11px; color: var(--ink-3); }
.dev-st.warn { color: var(--warn-ink); }
.dev-st.bad { color: var(--bad-ink); }
/* Agentes: fontes oficiais em fichas */
.ft-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.ft-chips a { font-size: 11.5px; padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); text-decoration: none; }
.ft-chips a:hover { background: var(--hover); }

/* Modelos v2 ("Por PC"): tabela única; Todos no topo; exceção marcada, igual a Todos apagado */
.mv-switch { display: flex; justify-content: flex-end; margin: 0 0 10px; }
.mv2 { display: grid; gap: 14px; min-width: 0; }
.pc-wrap { overflow-x: auto; }
.pc-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.pc-table thead th { padding: 6px 8px; border-bottom: 1px solid var(--line); color: var(--ink-2); font-weight: 600; text-align: left; white-space: nowrap; }
.pc-table td, .pc-table tbody th { padding: 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.pc-who { min-width: 120px; padding: 8px !important; text-align: left; font-weight: 400; }
.pc-who b, .pc-who small { display: block; }
.pc-who small { color: var(--ink-3, var(--ink-2)); font-size: 11px; }
.pc-st.good { color: var(--good-ink); }
.pc-st.bad { color: var(--bad-ink); }
.pc-c { min-width: 170px; }
.pc-btn { display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 6px 8px; border: 1px solid transparent; border-radius: 8px; background: none; color: inherit; font-family: inherit; font-size: inherit; text-align: left; cursor: pointer; }
.pc-btn:hover { background: var(--hover); }
.pc-btn:focus-visible { outline: 2px solid var(--accent, currentColor); outline-offset: 1px; }
.pc-btn.ro { cursor: default; }
.pc-btn small { color: var(--ink-3, var(--ink-2)); font-size: 11px; }
.pc-main { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.pc-main b { font-weight: 600; }
.pc-eff { color: var(--ink-2); }
.pc-tag { padding: 0 6px; border-radius: 999px; background: var(--accent-soft); color: var(--accent, var(--ink)); font-size: 10.5px; }
.pc-drift { color: var(--warn-ink); }
.pc-c.same .pc-btn { opacity: .55; }
.pc-c.same .pc-btn:hover, .pc-c.same .pc-btn:focus-visible { opacity: 1; }
.pc-c.exc .pc-btn { border-color: var(--accent-soft); background: var(--soft); }
.pc-todos .pc-btn { background: var(--soft); }
.pc-table tr.off .pc-c { opacity: .5; }
