:root {
  --bg: #15173a;
  --panel: #1b1e48;
  --card: #23265a;
  --line: #2b2f68;
  --text: #f2f4ff;
  --muted: #8c90c4;
  --cyan: #22c3e6;
  --gold: #f4b740;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.45 "Exo 2", system-ui, sans-serif; display: flex; flex-direction: column; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }
[hidden] { display: none !important; } /* hidden vence o display:flex das seções */
/* Barra de rolagem fina, na cor do tema (Firefox e Chrome/Edge). */
* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

.top { display: flex; align-items: center; gap: 24px; padding: 18px 40px; border-bottom: 1px solid var(--line); }
.top h1 { margin: 0; font-size: 19px; font-weight: 500; }
.top h1 span { color: var(--cyan); }
.who { display: flex; align-items: center; gap: 10px; padding-left: 24px; border-left: 1px solid var(--line); font-size: 13px; }
.who b { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #2d6cdf, var(--cyan)); font-size: 13px; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.badge { color: var(--gold); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding-left: 22px; border-left: 1px solid var(--line); }
.icon { position: relative; background: none; border: 0; width: 36px; height: 36px; display: grid; place-items: center; cursor: pointer; border-radius: 10px; color: var(--muted); }
.icon:hover { color: var(--text); }
.icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.top .icon { color: var(--text); }
.switch { display: flex; align-items: center; gap: 10px; background: none; border: 0; cursor: pointer; color: var(--muted); font-size: 13px; padding: 6px 4px; }
.switch i { width: 34px; height: 18px; border-radius: 9px; background: var(--line); position: relative; transition: background .2s; }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: transform .2s, background .2s; }
.switch[aria-checked="true"] { color: var(--text); }
.switch[aria-checked="true"] i { background: rgba(34, 195, 230, .35); }
.switch[aria-checked="true"] i::after { transform: translateX(16px); background: var(--cyan); }
#pend { position: absolute; top: 2px; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--cyan); color: #06202a; font: 600 10px/16px "Exo 2", sans-serif; font-style: normal; }

main { flex: 1; min-height: 0; display: grid; grid-template-columns: 300px 1fr 400px; grid-template-rows: minmax(0, 1fr); gap: 32px; padding: 26px 40px; }
.col { min-height: 0; display: flex; flex-direction: column; }
h2 { margin: 0 0 16px; font-size: 18px; font-weight: 500; }
h2 small { color: var(--muted); font-size: 12px; font-weight: 400; }
h3 { margin: 22px 0 8px; font-size: 13px; font-weight: 500; color: var(--cyan); }

/* Esquerda: pastas e, embaixo, o foco da semana. */
.left { overflow: auto; padding-right: 4px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; align-content: start; }
.card { text-align: left; background: var(--card); border: 1px solid transparent; border-radius: 12px; padding: 12px 10px 10px; cursor: pointer; display: flex; flex-direction: column; gap: 14px; min-height: 70px; min-width: 0; }
.card:hover { border-color: var(--cyan); }
.card span { color: var(--cyan); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; }
.card small { color: var(--text); font-size: 11px; }
.card i { display: block; height: 4px; border-radius: 2px; background: var(--line); position: relative; margin-top: -14px; }
.card i::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); min-width: 4px; border-radius: 2px; background: var(--cyan); }
/* Setores esticam até o fim da coluna (linhas iguais dividem o espaço que sobra). */
#home-view { display: flex; flex-direction: column; flex: 1; min-height: 0; }
#h-setores { margin-top: 24px; }
.setores { flex: 1; grid-template-columns: repeat(2, 1fr); grid-auto-rows: minmax(44px, 1fr); align-content: stretch; } /* 2 colunas: "Controladoria" cabe inteiro */
.card.setor { min-height: 0; justify-content: center; gap: 0; }
.card.setor span { color: var(--text); font-size: 13px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.card.setor:hover span { color: var(--cyan); }

/* Centro: esfera grande até a primeira mensagem; depois ela encolhe no topo e a conversa ocupa o espaço. */
.center { align-items: center; justify-content: flex-start; }
/* O canvas sobra ~20% em cima e embaixo (espaço do brilho): margens negativas tiram a folga e o globo sobe. */
.orb-wrap { --s: min(100%, 62vh); width: var(--s); aspect-ratio: 1; flex: none; margin: calc(var(--s) * -.14) 0 calc(var(--s) * -.17); }
#orb { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
#orb:active { cursor: grabbing; }
.status { margin: 10px 0 18px; font-size: 30px; font-weight: 400; letter-spacing: .02em; text-align: center; }
body[data-state="thinking"] .status, body[data-state="speaking"] .status { animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .55; } }

/* Direita: painel de conversa sempre aberto, com a caixa de pergunta embaixo. */
.conv { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.conv > header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.conv h2 { margin: 0; font-size: 16px; }
.pill { display: flex; align-items: center; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 12px; cursor: pointer; }
.pill:hover { border-color: var(--cyan); }
.pill svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chat { display: flex; flex-direction: column; gap: 14px; flex: 1; min-height: 0; overflow: auto; padding: 16px; }
.msg { max-width: 90%; line-height: 1.55; font-size: 14px; }
.msg p { margin: 0 0 8px; }
.msg p:last-child { margin-bottom: 0; }
.msg ul { margin: 4px 0 8px; padding-left: 20px; }
.msg table { border-collapse: collapse; margin: 6px 0 10px; font-size: 13px; }
.msg th, .msg td { text-align: left; padding: 6px 12px 6px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.msg th { color: var(--cyan); font-weight: 500; }
.msg code { font: 12px ui-monospace, Consolas, monospace; background: var(--panel); border-radius: 4px; padding: 1px 5px; }
.msg.user { align-self: flex-end; background: rgba(34, 195, 230, .16); border: 1px solid rgba(34, 195, 230, .35); border-radius: 14px 14px 4px 14px; padding: 9px 14px; }
.msg.ai { align-self: flex-start; padding: 12px 16px; border: 1px solid var(--line); border-radius: 4px 14px 14px 14px; background: var(--card); }
.msg.err { color: #ff8d8d; border-color: #ff8d8d; }
.dots::after { content: "..."; animation: breathe 1.2s ease-in-out infinite; }
.msg .sources { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 10px 0 0; }
.msg .sources a { display: block; font-size: 12px; color: var(--muted); text-decoration: none; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; }
.msg .sources a:hover { color: var(--cyan); border-color: var(--cyan); }

/* Gráfico do card de pasta: ocupa a coluna da esquerda até o Voltar. */
#pasta-view { padding: 14px 16px 16px; margin: 0; }
#voltar { margin-bottom: 14px; }
.chart h4 { margin: 0 0 12px; font-size: 15px; font-weight: 600; color: var(--cyan); text-transform: uppercase; letter-spacing: .04em; }
.chart h4 small { color: var(--muted); font-weight: 400; text-transform: none; letter-spacing: 0; margin-left: 6px; }
.charts { display: grid; gap: 18px; }
.chart figure { margin: 0; }
.chart figcaption { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.bars li { display: grid; grid-template-columns: 90px 1fr 24px; align-items: center; gap: 8px; }
.bars span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars i { height: 10px; border-radius: 3px; background: var(--line); position: relative; }
.bars i::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); min-width: 3px; border-radius: 3px; background: var(--cyan); }
.bars b { font-weight: 600; text-align: right; }
.cols { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.cols li { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; font-size: 11px; height: 110px; }
.cols b { font-weight: 600; min-height: 14px; }
.cols i { width: 70%; height: calc(var(--h) * .7); min-height: 2px; border-radius: 3px 3px 0 0; background: var(--cyan); }
.cols span { color: var(--muted); }
.notes { list-style: none; margin: 16px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.notes li { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; }
.notes a { color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notes a:hover { color: var(--cyan); }
.notes em { font-style: normal; font-size: 11px; color: var(--gold); }
.notes small { color: var(--muted); font-size: 11px; }

.bar { display: flex; align-items: center; gap: 6px; flex: none; margin: 0 14px 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 6px 8px; }

/* Card de clima (topo da esquerda). */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 24px; }
.panel > header { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--line); }
.panel h2 { margin: 0; font-size: 15px; }
#clima { padding: 14px 16px 16px; }
#clima > p { margin: 0; font-size: 13px; }
.clima .now { display: flex; align-items: center; justify-content: space-between; }
.clima .now b { display: block; font-size: 26px; font-weight: 500; }
.clima .now span { display: block; color: var(--cyan); font-size: 13px; }
.clima .now small { color: var(--muted); font-size: 12px; }
.clima .now i { font-style: normal; font-size: 40px; line-height: 1; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 0; }
.stats div { background: var(--card); border-radius: 8px; padding: 8px 4px; text-align: center; }
.stats dt { color: var(--muted); font-size: 11px; }
.stats dd { margin: 2px 0 0; font-size: 13px; font-weight: 500; }
.bar input { flex: 1; min-width: 0; background: none; border: 0; color: var(--text); font: inherit; padding: 8px 6px; }
.bar input::placeholder { color: var(--muted); }
.bar input:focus { outline: none; }
.bar:focus-within { box-shadow: 0 0 0 1px var(--cyan); }
#home { color: var(--text); }
#mic.on { color: var(--cyan); }
#send:disabled { opacity: .4; cursor: default; }

/* Painéis embaixo da esfera: lado a lado; se a coluna for estreita, um embaixo do outro, rolando só aqui. */
.paineis { flex: 0 1 auto; margin-top: auto; min-height: 0; overflow: auto; width: min(100%, 976px); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px; align-content: start; }
.paineis > .panel { height: 229px; min-width: 0; margin: 0; display: flex; flex-direction: column; overflow: hidden; }
.fat { container-type: inline-size; }
.fat-vazio { grid-column: 1 / -1; margin: 0; font-size: 13px; }
.proj > header small { margin-right: 8px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.proj-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 128px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: 16px; align-items: center; padding: 10px 16px; }
.proj-body > p { grid-column: 1 / -1; margin: 0; font-size: 13px; }
.donut { position: relative; margin: 0; width: 128px; height: 128px; }
.donut svg { display: block; width: 100%; height: 100%; }
.donut circle { fill: none; stroke-width: 15; }
.donut circle:hover { stroke-width: 18; }
.donut figcaption { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.donut b { font-size: 24px; font-weight: 500; line-height: 1.1; }
.donut small { font-size: 11px; color: var(--muted); }
.proj-info { min-width: 0; min-height: 0; height: 100%; display: flex; flex-direction: column; gap: 10px; }
.proj-legenda { list-style: none; margin: 0; padding: 0 0 8px; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); }
.proj-legenda li { display: flex; align-items: center; gap: 5px; }
.proj-legenda b { color: var(--text); font-weight: 500; }
.proj-legenda i, .proj-lista i { flex: none; width: 9px; height: 9px; border-radius: 2px; }
.proj-lista { min-height: 0; overflow: auto; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; font-size: 13px; }
.proj-lista li { display: grid; grid-template-columns: 9px minmax(0, 1fr); align-items: center; column-gap: 7px; }
.proj-lista a { color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-lista a::first-letter { text-transform: uppercase; }
.proj-lista a:hover { color: var(--cyan); }
.proj-lista small { grid-column: 2; font-size: 11px; color: var(--muted); }
.fat-tag { margin-right: 8px; color: var(--gold); border: 1px solid var(--gold); border-radius: 999px; padding: 2px 10px; font-size: 11px; font-weight: 600; }
.fat-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 210px 1fr; gap: 24px; padding: 12px 18px 12px 16px; }
.fat-now { display: flex; flex-direction: column; justify-content: center; gap: 3px; border-right: 1px solid var(--line); padding-right: 20px; }
.fat-now small { color: var(--muted); font-size: 12px; }
.fat-now small:first-child::first-letter { text-transform: uppercase; }
.fat-now b { font-size: 25px; font-weight: 500; }
.fat-now span { font-size: 12px; color: var(--cyan); }
.fat-progress { display: block; height: 6px; margin-top: 8px; border-radius: 3px; background: var(--line); position: relative; }
.fat-progress::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: 3px; background: var(--cyan); }
.fat-chart { margin: 0; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.fat-chart figcaption { display: flex; gap: 14px; align-items: center; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.fat-chart figcaption span { margin-right: auto; }
.fat-chart em { font-style: normal; display: flex; align-items: center; gap: 5px; }
.fat-chart em::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--cyan); }
.fat-chart em.meta::before { height: 2px; border-radius: 0; background: var(--gold); }
.fat-chart ol { flex: 1; min-height: 0; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.fat-chart li { min-height: 0; display: flex; flex-direction: column; align-items: center; font-size: 11px; }
.fat-chart li div { position: relative; flex: 1; width: 100%; min-height: 30px; }
.fat-chart li i { position: absolute; bottom: 0; left: 18%; right: 18%; height: var(--h); border-radius: 4px 4px 0 0; background: rgba(34, 195, 230, .55); }
.fat-chart li.hit i { background: var(--cyan); }
.fat-chart li:last-child i { background: var(--cyan); box-shadow: 0 0 12px rgba(34, 195, 230, .5); }
.fat-chart li u { position: absolute; bottom: var(--h); left: 8%; right: 8%; height: 2px; background: var(--gold); text-decoration: none; }
.fat-chart li b { margin-top: 5px; font-weight: 500; white-space: nowrap; }
.fat-chart li span:not(.sr) { color: var(--muted); }
/* Painel estreito (notebook, celular): o mês atual vira uma faixa acima do gráfico, e as barras ficam com a largura toda. */
@container (max-width: 720px) {
  .fat-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 8px; padding: 10px 14px; }
  .fat-now { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; border-right: 0; padding-right: 0; }
  .fat-now b { font-size: 19px; }
  .fat-progress { order: 5; flex-basis: 100%; margin-top: 2px; }
  .fat-chart ol { gap: 6px; }
  .fat-chart li { font-size: 10px; }
}
/* Telas mais baixas: a esfera encolhe para o painel continuar legível. */
@media (max-height: 800px) { .center .orb-wrap { --s: min(100%, 44vh); } .center .status { font-size: 24px; margin: 4px 0 10px; } }

/* Dashboards do setor: tomam o lugar da esfera e dos painéis no centro. */
.center.em-setor > :not(#setor-view) { display: none; }
.card.setor[aria-pressed="true"] { border-color: var(--cyan); }
.card.setor[aria-pressed="true"] span { color: var(--cyan); }
.setor-view { position: relative; flex: 1; min-height: 0; width: 100%; max-width: 1100px; overflow: auto; display: flex; flex-direction: column; gap: 12px; container-type: inline-size; }
.dash-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; flex: none; }
.dash-head h2 { margin: 0; font-size: 22px; outline: none; }
.dash-head small { color: var(--muted); font-size: 12px; }
.dash-head .fat-tag { margin-right: 0; }
.dash-data { margin-left: auto; }
.pill svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dash-vazio { margin: 0; padding: 18px; font-size: 13px; }
.dash-kpis { flex: none; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.dash-kpis li { margin: 0; padding: 12px 16px; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.dash-kpis small { color: var(--muted); font-size: 12px; }
.dash-kpis b { font-size: 24px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-rows: minmax(240px, 1.25fr) minmax(170px, 1fr); gap: 12px; }
.dash-panel { margin: 0; min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; grid-column: span 2; }
.dash-panel.dash-wide { grid-column: span 3; }
.dash-panel.dash-wide-2 { grid-column: span 3; }
.dash-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 16px; border-bottom: 1px solid var(--line); flex: none; }
.dash-panel h3 { margin: 0; font-size: 14px; font-weight: 500; color: var(--text); }
.dash-panel header small { color: var(--muted); font-size: 12px; }
.dash-body { flex: 1; min-height: 0; overflow: auto; padding: 12px 16px; }
.dash-legend { list-style: none; margin: 0; padding: 0; display: flex; gap: 12px; font-size: 12px; color: var(--muted); }
.dash-legend li { display: flex; align-items: center; gap: 5px; }
.dash-legend li::before { content: ""; width: 14px; border-top: 2px solid var(--cyan); }
.dash-legend .proj::before { border-top-style: dashed; }
.dash-legend .meta::before { border-top: 1px solid var(--gold); }
.dash-line { position: relative; height: 100%; min-height: 120px; }
.dash-line svg { display: block; width: 100%; height: 100%; }
.dash-grid-line { stroke: var(--line); stroke-width: 1; }
.dash-axis { fill: var(--muted); font-size: 11px; font-family: inherit; }
.dash-real, .dash-proj { fill: none; stroke: var(--cyan); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.dash-proj { stroke-dasharray: 5 5; }
.dash-meta { stroke: var(--gold); stroke-width: 1; }
.dash-dot { fill: var(--cyan); stroke: var(--panel); stroke-width: 2; }
.dash-cross { stroke: var(--muted); stroke-width: 1; }
.dash-hit { fill: transparent; }
.dash-tip { position: absolute; z-index: 2; pointer-events: none; white-space: nowrap; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; font-size: 12px; }
.dash-meters, .dash-bars, .dash-pend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; font-size: 13px; }
.dash-meters li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: baseline; gap: 4px 10px; }
.dash-meters span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-meters small, .dash-pend small { color: var(--muted); font-size: 11px; white-space: nowrap; }
.dash-meters b, .dash-bars b { font-weight: 500; }
.dash-meters i { grid-column: 1 / -1; display: block; height: 6px; border-radius: 3px; background: var(--line); position: relative; }
.dash-meters i::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: 3px; background: var(--cyan); }
.dash-bars { gap: 9px; }
.dash-bars li { display: grid; grid-template-columns: 96px minmax(0, 1fr) 46px; align-items: center; gap: 8px; }
.dash-bars span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-bars i { display: block; height: 10px; position: relative; }
.dash-bars i::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); min-width: 3px; border-radius: 0 4px 4px 0; background: var(--cyan); }
.dash-bars b { text-align: right; }
.dash-pend li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.dash-pend li:last-child { border-bottom: 0; padding-bottom: 0; }
@container (max-width: 760px) {
  .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid { flex: none; grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-auto-rows: auto; }
  .dash-panel, .dash-panel.dash-wide, .dash-panel.dash-wide-2 { grid-column: auto; }
  .dash-line { height: 190px; }
}

/* Tela de login: mesma esfera e mesmos painéis, em uma coluna centralizada. */
.login-main { display: flex; flex-direction: column; align-items: center; overflow: auto; }
.login-main .orb-wrap { --s: min(100%, 44vh); }
.login-main .status { font-size: 26px; margin: 0 0 18px; }
.login-form { width: min(100%, 380px); flex: none; margin: 0; padding: 18px 20px 20px; display: flex; flex-direction: column; }
.login-form label { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.login-form input { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; color: var(--text); font: inherit; padding: 10px 12px; margin-bottom: 14px; }
.login-form input:focus { outline: none; border-color: var(--cyan); }
.login-erro { margin: 0; color: #ff8d8d; font-size: 13px; }
.login-erro:not(:empty) { margin-bottom: 12px; }
.login-btn { background: var(--cyan); color: #06202a; border: 0; border-radius: 10px; padding: 11px; font-weight: 600; cursor: pointer; }
.login-btn:hover { filter: brightness(1.1); }
.login-btn:disabled { opacity: .5; cursor: default; }

@media (max-width: 1100px) {
  html, body { height: auto; }
  main { grid-template-columns: 1fr; grid-template-rows: none; padding: 16px; gap: 24px; }
  .left { overflow: visible; }
  .center { order: -2; }
  .conv { order: -1; height: 75vh; }
  .top { padding: 14px 16px; gap: 14px; }
  .who { display: none; }
  .orb-wrap { --s: min(100%, 420px); }
  .msg { max-width: 100%; }
  .setor-view { overflow: visible; flex: none; }
  .paineis { overflow: visible; flex: none; margin-top: 0; }
  .paineis > .panel { height: auto; }
  .fat-chart ol { height: 110px; flex: none; }
}
