/* Consumos por quadro (design-v3/CONSUMOS-POR-QUADRO.md): as peças novas do protótipo aprovado, com o prefixo cq-.
   Só tokens: nenhuma cor escrita. As medidas são as do protótipo, salvo as diferenças assumidas da §5 do documento
   (sub-texto 15 px, nome da linha 17 px, pesquisa 16 px, painel 24 px abaixo de 600 px). */

:root { --cq-mw: 80px; --cq-bh: 132px; }
@media (min-width: 600px) { :root { --cq-mw: 96px; --cq-bh: 150px; } }
@media (min-width: 1024px) { :root { --cq-mw: 108px; --cq-bh: 164px; } }

/* Cor de cada uso: a plataforma escolhe (§4.1); a app só põe a classe. */
.cq-c-u1 { --c: var(--u1); } .cq-c-u2 { --c: var(--u2); } .cq-c-u3 { --c: var(--u3); } .cq-c-u4 { --c: var(--u4); }
.cq-c-u5 { --c: var(--u5); } .cq-c-n0 { --c: var(--n0); } .cq-c-n1 { --c: var(--n1); } .cq-c-n2 { --c: var(--n2); }
.cq-c-n3 { --c: var(--n3); }

/* ---------- Casca ---------- */
.cq { display: flex; flex-direction: column; gap: var(--space-3); }
.cq-top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.cq-top h1 { font-size: 20px; line-height: 28px; font-weight: 650; letter-spacing: -0.01em; }
.cq-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); }
.cq-ctrl { display: flex; align-items: center; gap: var(--space-2); }
.cq-tabs { max-width: 100%; }
.cq-tabs .segment { flex: 1 1 auto; white-space: nowrap; }
@media (max-width: 599px) { .cq-tabs { width: 100%; } .cq-top h1 { line-height: 24px; } }
.cq-pill {
	display: inline-flex; align-items: center; gap: 6px; min-height: var(--touch); padding: 0 14px 0 16px;
	border-radius: 999px; border: 1px solid var(--control-border); background: var(--surface); color: var(--text);
	cursor: pointer; font-size: var(--fs-small); font-weight: 600; white-space: nowrap;
}
.cq-pill .icon { width: 16px; height: 16px; }

/* ---------- Grelha e painéis ---------- */
.cq-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); align-content: start; align-items: start; }
@media (min-width: 1024px) {
	.cq-grid { gap: var(--space-5); }
	.cq-g75 { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
	.cq-span { grid-column: 1 / -1; }
}
.cq .panel { display: flex; flex-direction: column; gap: var(--space-4); }
@media (min-width: 1024px) { .cq .panel { padding: var(--space-6); } }
.cq-ph { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-4); }
.cq h2 { font-size: 20px; line-height: 26px; font-weight: 600; }
.cq-big { font-size: var(--fs-display); line-height: 52px; font-weight: 300; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (min-width: 1024px) { .cq-big { font-size: 64px; line-height: 68px; } }
.cq-lead { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }
.cq-lead strong, .cq-mini strong { color: var(--text); font-weight: 600; }
.cq-nw { white-space: nowrap; }

/* ---------- Herói ---------- */
.cq .cq-hero { gap: var(--space-5); }
.cq-hero-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-4); }
.cq-hero-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
@media (min-width: 1024px) { .cq-hero-top { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-7); align-items: end; } }
.cq-hero-main { display: flex; flex-direction: column; gap: 6px; }
.cq-hero-side { display: flex; flex-direction: column; gap: 10px; }
.cq-mini { display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-small); line-height: var(--lh-small); }
.cq-tr { display: flex; height: 6px; border-radius: 3px; overflow: hidden; gap: 2px; background: var(--surface-2); }
.cq-tr i, .cq-bus i, .cq-term i, .cq-when i { display: block; height: 100%; }
.cq-o-solar { background: var(--flow-solar); } .cq-o-grid { background: var(--flow-grid); } .cq-o-known { background: var(--text); }

/* Herói A: fatura aberta */
.cq-bill { display: flex; height: 56px; border-radius: 14px; overflow: hidden; gap: 3px; }
.cq-bill i { display: block; height: 100%; min-width: 4px; background: var(--c); }
.cq-bill i.is-hatch, .cq-sw.is-hatch-l { background: repeating-linear-gradient(135deg, var(--c) 0 3px, transparent 3px 7px); box-shadow: inset 0 0 0 1.5px var(--c); }
.cq-bill i.is-fixed { background: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--control-border); }
.cq-story { font-size: 20px; line-height: 30px; font-weight: 400; max-width: 62ch; }
.cq-story strong { font-weight: 650; }
.cq-lg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px var(--space-4); }
@media (min-width: 1024px) { .cq-lg { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cq-lg > * { display: flex; align-items: flex-start; gap: 10px; min-height: 52px; padding: 6px 4px; border: 0; background: transparent; color: var(--text); text-align: left; border-radius: 10px; cursor: pointer; }
.cq-lg > div { cursor: default; }
.cq-lg .cq-sw { margin-top: 5px; }
.cq-lg .cq-x { display: flex; flex-direction: column; min-width: 0; }
.cq-lg .cq-x b { font-size: var(--fs-small); line-height: 20px; font-weight: 600; }
.cq-lg .cq-x span { font-size: var(--fs-small); line-height: 20px; color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Herói B: quadro aberto */
.cq-cab { position: relative; background: var(--cab-bg); border-radius: 18px; padding: 16px 0 12px; display: flex; flex-direction: column; gap: var(--space-3); box-shadow: inset 0 0 0 1px var(--hairline); overflow: hidden; }
.cq-cab-h { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--space-3); padding: 0 var(--space-4); min-height: var(--touch); }
.cq-nm2 { display: flex; flex-direction: column; }
.cq-nm2 b { font-size: 17px; line-height: 22px; font-weight: 650; }
.cq-backbtn { display: inline-flex; align-items: center; gap: 4px; min-height: var(--touch); padding: 0 14px 0 8px; border-radius: 999px; border: 1px solid var(--control-border); background: var(--surface); color: var(--text); cursor: pointer; font-size: var(--fs-small); font-weight: 600; }
.cq-backbtn { max-width: 100%; min-width: 0; }
.cq-backbtn .icon { width: 20px; height: 20px; flex-shrink: 0; }
.cq-backbtn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cq-railscroll { overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: thin; padding: 0 var(--space-4) var(--space-2); }
.cq-railin { position: relative; display: inline-flex; flex-direction: column; min-width: 100%; }
.cq-bus { display: flex; height: 10px; border-radius: 5px; overflow: hidden; gap: 2px; margin: 0 4px; }
.cq-rail { position: relative; display: flex; justify-content: center; gap: var(--space-3); padding: 0 4px; }
.cq-din { position: absolute; left: 0; right: 0; top: calc(10px + 20px + 8px + 6px + var(--cq-bh) / 2 - 14px); height: 28px; background: var(--cab-rail); border-radius: 4px; }
.cq-din::after { content: ""; position: absolute; left: 0; right: 0; top: 11px; height: 6px; background: repeating-linear-gradient(90deg, var(--cab-slot) 0 12px, transparent 12px 20px); }
.cq-mod { position: relative; z-index: 1; flex: 0 0 auto; width: var(--cq-mw); display: flex; flex-direction: column; align-items: center; border: 0; background: transparent; color: var(--text); padding: 0; cursor: pointer; scroll-snap-align: start; text-align: left; }
.cq-mod.is-cabinet { width: calc(var(--cq-mw) * 1.7); }
.cq-drop { width: 2px; height: 20px; background: var(--control-border); }
.cq-term { display: flex; width: 34px; height: 8px; border-radius: 4px; overflow: hidden; gap: 1px; background: var(--surface-2); }
.cq-body { position: relative; margin-top: 6px; width: 100%; height: var(--cq-bh); border-radius: 10px; background: var(--cab-mod); box-shadow: inset 0 0 0 1px var(--hairline), 0 1px 0 var(--hairline); overflow: hidden; transition: box-shadow 160ms; }
.cq-mod:hover .cq-body { box-shadow: inset 0 0 0 1.5px var(--text); }
.cq-track { position: absolute; left: 10px; right: 10px; bottom: 10px; top: 54px; border-radius: 6px; background: var(--surface-2); }
.cq-fill { position: absolute; left: 10px; right: 10px; bottom: 10px; height: calc((var(--cq-bh) - 64px) * var(--f, 0.02)); min-height: 3px; border-radius: 6px; background: var(--c); }
.cq-fill.is-hatch { background: repeating-linear-gradient(135deg, var(--c) 0 3px, transparent 3px 7px); box-shadow: inset 0 0 0 1.5px var(--c); }
.cq-lever { position: absolute; top: 10px; left: 50%; width: 22px; height: 34px; margin-left: -11px; border-radius: 6px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--control-border); }
.cq-lever::after { content: ""; position: absolute; left: 5px; right: 5px; top: 5px; height: 12px; border-radius: 3px; background: var(--control-border); }
.is-cabinet .cq-lever { left: auto; right: 12px; width: 8px; height: 40px; margin: 0; top: 8px; border-radius: 4px; }
.is-cabinet .cq-lever::after { display: none; }
.cq-vent { position: absolute; top: 14px; left: 14px; width: 40%; height: 22px; background: repeating-linear-gradient(180deg, var(--control-border) 0 2px, transparent 2px 6px); opacity: 0.6; border-radius: 2px; }
.cq-tape { margin-top: 10px; width: 100%; padding: 6px 8px 7px; border-radius: 3px; background: var(--tape); color: var(--tape-text); box-shadow: 0 1px 0 var(--tape-edge), inset 0 -1px 0 var(--tape-edge); display: flex; flex-direction: column; gap: 1px; }
.cq-tape b { font-size: 13px; line-height: 17px; font-weight: 700; letter-spacing: 0.02em; overflow-wrap: break-word; }
.cq-tape span { font-family: var(--font-mono); font-size: 13px; line-height: 17px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cq-hint { margin-top: 6px; font-size: 13px; line-height: 18px; color: var(--text-muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 2px; }
.cq-hint .icon { width: 16px; height: 16px; }
.cq-mod.is-more .cq-body { background: transparent; box-shadow: inset 0 0 0 1.5px var(--control-border); display: grid; place-items: center; }
.cq-mod.is-more .cq-body b { font-size: 24px; font-weight: 300; }
.cq-eq { padding: 0 var(--space-4); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }
.cq-panel-eq { padding: 0; }
.cq-eq-note { margin: 0; } /* a nota de revisão no lugar da equação da vista Por uso */
.cq-eq b { color: var(--text); font-weight: 600; }
.cq-cab .cq-legend { padding: 0 var(--space-4); }
.cq-door { position: absolute; inset: 0; z-index: 3; border-radius: 18px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--control-border); transform-origin: left center; pointer-events: none; animation: cq-door 640ms cubic-bezier(.5,.05,.6,1) forwards; }
.cq-door::after { content: ""; position: absolute; right: 22px; top: 50%; width: 8px; height: 56px; margin-top: -28px; border-radius: 4px; background: var(--control-border); }
@keyframes cq-door { 0% { transform: perspective(1400px) rotateY(0); opacity: 1; } 75% { opacity: 1; } 100% { transform: perspective(1400px) rotateY(-100deg); opacity: 0; } }
.cq-opening .cq-mod { animation: cq-modin 420ms ease-out both; animation-delay: calc(160ms + var(--i, 0) * 45ms); }
.cq-opening .cq-fill { animation: cq-fillup 700ms ease-out both; animation-delay: calc(260ms + var(--i, 0) * 45ms); }
@keyframes cq-modin { from { opacity: 0; transform: translateY(10px); } }
@keyframes cq-fillup { from { height: 0; } }
@media (prefers-reduced-motion: reduce) { .cq-door { display: none; } }

/* ---------- Linhas ---------- */
.cq-rows { display: flex; flex-direction: column; }
.cq-row { display: flex; align-items: stretch; border-top: 1px solid var(--hairline); }
.cq-rows > .cq-row:first-child { border-top: 0; }
.cq-ind { flex-shrink: 0; width: calc(var(--lv, 0) * 20px); }
.cq-exp { flex-shrink: 0; width: var(--touch); min-height: var(--touch); display: grid; place-items: center; border: 0; background: transparent; border-radius: 10px; cursor: pointer; color: var(--text-muted); align-self: center; }
.cq-exp .icon { width: 16px; height: 16px; transition: transform 200ms; }
.cq-exp[aria-expanded="true"] .icon { transform: rotate(90deg); }
.cq-exp.is-empty { cursor: default; }
.cq-rowbtn { flex: 1; min-width: 0; display: grid; grid-template-columns: 12px minmax(0, 1fr) 104px 20px; column-gap: var(--space-3); align-items: center; min-height: 60px; padding: 10px 0; border: 0; background: transparent; color: var(--text); text-align: left; cursor: pointer; border-radius: 10px; }
@media (max-width: 599px) { .cq-rowbtn { grid-template-columns: 12px minmax(0, 1fr) 84px 16px; column-gap: 10px; } }
.cq-sw { width: 12px; height: 12px; border-radius: 3px; background: var(--c, var(--n2)); flex-shrink: 0; align-self: start; margin-top: 5px; }
.cq-sw.is-hatch { background: transparent; box-shadow: inset 0 0 0 2px var(--c); background-image: repeating-linear-gradient(135deg, var(--c) 0 2px, transparent 2px 5px); }
.cq-sw.is-fixed { background: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--control-border); }
.cq-nm { min-width: 0; display: flex; flex-direction: column; }
.cq-t { font-size: var(--fs-body); line-height: 22px; font-weight: 600; overflow-wrap: anywhere; }
.cq-s { font-size: var(--fs-small); line-height: 20px; color: var(--text-muted); overflow-wrap: anywhere; }
.cq-note-warn { font-size: var(--fs-small); line-height: 20px; color: var(--warning); }
.cq-selo { align-self: flex-start; display: inline-flex; align-items: center; margin-top: 4px; padding: 0 8px; border-radius: 999px; font-size: 13px; line-height: 20px; box-shadow: inset 0 0 0 1px var(--control-border); color: var(--text-muted); }
.cq-selo.is-est { box-shadow: inset 0 0 0 1px var(--warning); color: var(--warning); }
.cq-barline { display: flex; align-items: center; gap: var(--space-2); margin-top: 6px; }
.cq-pc { flex-shrink: 0; width: 40px; font-size: 13px; line-height: 16px; color: var(--text-muted); text-align: right; font-variant-numeric: tabular-nums; }
.cq-line { flex: 1; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.cq-line i { display: block; height: 100%; border-radius: 3px; background: var(--c, var(--n2)); }
.cq-line.is-hatch i { background: repeating-linear-gradient(90deg, var(--c) 0 4px, transparent 4px 7px); }
.cq-val { display: flex; flex-direction: column; text-align: right; align-self: start; }
.cq-e { font-size: var(--fs-body); line-height: 22px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cq-k { font-size: var(--fs-small); line-height: 20px; color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cq-chev { display: grid; place-items: center; color: var(--text-muted); }
.cq-chev .icon { width: 16px; height: 16px; }
.cq-rowbtn[aria-expanded="true"] .cq-chev .icon { transform: rotate(90deg); }

/* ---------- Barra empilhada, pesquisa, migalhas, ligações ---------- */
.cq-stack { display: flex; height: 20px; border-radius: 6px; overflow: hidden; gap: 2px; }
.cq-stack i { display: block; height: 100%; min-width: 3px; background: var(--c); }
.cq-stack i.is-hatch { background: repeating-linear-gradient(135deg, var(--c) 0 3px, transparent 3px 7px); box-shadow: inset 0 0 0 1.5px var(--c); }
.cq-search { display: flex; align-items: center; gap: var(--space-2); min-height: 48px; padding: 0 var(--space-4); border: 1px solid var(--control-border); border-radius: 999px; background: var(--surface); }
.cq-search .icon { width: 20px; height: 20px; color: var(--text-muted); }
.cq-search input { flex: 1; min-width: 0; min-height: var(--touch); border: 0; background: transparent; font-size: 16px; outline: none; }
.cq-search:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.cq-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0 2px; font-size: var(--fs-small); line-height: var(--lh-small); }
.cq-link { display: inline-flex; align-items: center; min-height: var(--touch); min-width: var(--touch); border: 0; background: transparent; padding: 0 4px; color: var(--accent-text); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font-size: var(--fs-small); align-self: flex-start; }
.cq-here { font-weight: 600; padding: 0 4px; }
.cq-crumbs > :first-child { padding-left: 0; }

/* ---------- A ver ---------- */
.cq-insights { display: flex; flex-direction: column; gap: var(--space-3); }
.cq-ins { display: flex; gap: var(--space-3); align-items: flex-start; padding: 14px 16px; border-radius: 16px; }
.cq-ins.is-soft { background: var(--accent-soft); }
.cq-ins.is-plain { box-shadow: inset 0 0 0 1px var(--hairline); }
.cq-ins.is-alert { border-radius: 4px 16px 16px 4px; box-shadow: inset 3px 0 0 var(--warning), inset 0 0 0 1px var(--hairline); }
.cq-ic { flex-shrink: 0; width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center; background: var(--surface-2); color: var(--text); margin-top: 2px; }
.cq-ic .icon { width: 16px; height: 16px; }
.cq-ins.is-soft .cq-ic { background: var(--surface); }
.cq-ins.is-alert .cq-ic { color: var(--warning); }
.cq-ins > div { display: flex; flex-direction: column; align-items: flex-start; }
.cq-ins p { font-size: var(--fs-small); line-height: var(--lh-small); }
.cq-ins p b { font-weight: 600; }
.cq-who { color: var(--text-muted); font-size: var(--fs-small); line-height: 20px; }
.cq-prodbox { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-4); border-radius: 16px; box-shadow: inset 0 0 0 1px var(--hairline); }
.cq-prodbox p { font-size: var(--fs-small); line-height: var(--lh-small); }

/* ---------- Gráficos ---------- */
.cq-chart svg { display: block; }
.cq-sk-n { font: 600 15px var(--font-sans); fill: var(--text); paint-order: stroke; stroke: var(--surface); stroke-width: 5px; stroke-linejoin: round; }
.cq-sk-v { font: var(--fs-label) var(--font-sans); fill: var(--text-muted); font-variant-numeric: tabular-nums; paint-order: stroke; stroke: var(--surface); stroke-width: 5px; stroke-linejoin: round; }
.cq-ax { font: 12px var(--font-sans); fill: var(--text-muted); font-variant-numeric: tabular-nums; }
.cq-flow-solar { fill: var(--flow-solar); opacity: 0.4; } .cq-flow-grid { fill: var(--flow-grid); opacity: 0.28; }
.cq-flow-vazio { fill: var(--tou-vazio); opacity: 0.32; } .cq-flow-fora_vazio, .cq-flow-cheias, .cq-flow-simples { fill: var(--tou-cheias); opacity: 0.3; } .cq-flow-ponta { fill: var(--tou-ponta); opacity: 0.32; }
.cq-src-solar, .cq-b-solar { fill: var(--flow-solar); } .cq-src-grid { fill: var(--flow-grid); } .cq-b-grid { fill: var(--bar); }
.cq-src-vazio, .cq-b-vazio { fill: var(--tou-vazio); } .cq-src-fora_vazio, .cq-b-fora_vazio, .cq-src-cheias, .cq-b-cheias, .cq-src-simples, .cq-b-simples { fill: var(--tou-cheias); } .cq-src-ponta, .cq-b-ponta { fill: var(--tou-ponta); }
.cq-node { fill: var(--c, var(--n2)); }
.cq-bg-vazio { fill: var(--band-vazio); } .cq-bg-ponta { fill: var(--band-ponta); }
.cq-grid-l { stroke: var(--hairline); stroke-width: 1; }
.cq-avg-l { stroke: var(--ghost); stroke-width: 1.5; stroke-dasharray: 4 4; fill: none; }
.cq-price-l { stroke: var(--text); stroke-width: 2; fill: none; }
.cq-hit { cursor: pointer; }
.cq-hit:focus-visible { outline: 2px solid var(--accent); }
.cq-legend { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: var(--fs-label); line-height: 20px; color: var(--text-muted); }
.cq-legend > span { display: inline-flex; align-items: center; gap: var(--space-2); }
.cq-dot { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }
.cq-dot.is-solar { background: var(--flow-solar); } .cq-dot.is-grid { background: var(--flow-grid); } .cq-dot.is-bar { background: var(--bar); }
.cq-dot.is-vazio { background: var(--tou-vazio); } .cq-dot.is-fora_vazio, .cq-dot.is-cheias, .cq-dot.is-simples { background: var(--tou-cheias); } .cq-dot.is-ponta { background: var(--tou-ponta); }
.cq-dot.is-bgv { background: var(--band-vazio); box-shadow: inset 0 0 0 1px var(--control-border); } .cq-dot.is-bgp { background: var(--band-ponta); box-shadow: inset 0 0 0 1px var(--control-border); }
.cq-dot.is-line { height: 2px; border-radius: 1px; background: var(--text); }

/* ---------- Detalhe ---------- */
.cq-title { font-size: var(--fs-title); line-height: 32px; font-weight: 650; }
.cq-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); }
.cq-fact { background: var(--surface-2); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cq-fact b { font-size: 22px; line-height: 28px; font-weight: 300; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cq-fact span { font-size: var(--fs-small); line-height: 20px; color: var(--text-muted); }
.cq-when { display: flex; height: 20px; border-radius: 6px; overflow: hidden; gap: 2px; }
.cq-w-vazio { background: var(--tou-vazio); } .cq-w-fora_vazio, .cq-w-cheias, .cq-w-simples { background: var(--tou-cheias); } .cq-w-ponta { background: var(--tou-ponta); } .cq-w-solar { background: var(--flow-solar); }
.cq-tbl { display: flex; flex-direction: column; }
.cq-tr2 { display: grid; grid-template-columns: minmax(0, 1fr) 80px 80px; gap: var(--space-2); align-items: center; min-height: var(--touch); border-top: 1px solid var(--hairline); font-size: var(--fs-small); line-height: 20px; }
.cq-tr2.is-head { min-height: 32px; border-top: 0; font-size: 13px; color: var(--text-muted); }
.cq-tr2.is-sum { font-weight: 650; border-top: 1.5px solid var(--text); }
.cq-tr2 > span:first-child { display: flex; align-items: center; gap: var(--space-2); }
.cq-tr2 > span:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Folha do período ---------- */
@media (max-width: 599px) {
	.cq-dialog-sheet { margin: auto 0 0; width: 100%; max-width: 100%; max-height: 86vh; border-radius: 20px 20px 0 0; }
}
.cq-sh-h { display: flex; align-items: center; justify-content: space-between; }
.cq-iconbtn { width: var(--touch); height: var(--touch); border: 0; border-radius: 999px; background: var(--surface-2); color: var(--text); display: grid; place-items: center; cursor: pointer; }
.cq-iconbtn .icon { width: 18px; height: 18px; }
.cq-opts { display: flex; flex-direction: column; gap: var(--space-2); }
.cq-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; min-height: 56px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--hairline); background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.cq-opt[aria-checked="true"] { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.cq-opt:disabled { opacity: 0.55; cursor: default; }
.cq-opt b { font-size: 16px; font-weight: 600; } .cq-opt span { font-size: var(--fs-small); color: var(--text-muted); }
.cq-step { display: flex; align-items: center; justify-content: space-between; }
.cq-step span { font-weight: 600; }
.cq-step button { width: var(--touch); height: var(--touch); border: 0; border-radius: 999px; background: transparent; color: var(--text); cursor: pointer; display: grid; place-items: center; }
.cq-step button:disabled { opacity: 0.3; cursor: default; }
.cq-foot { font-size: var(--fs-small); line-height: 20px; color: var(--text-muted); }

/* ---------- Atalho no Início ---------- */
.cq-home-shortcut { display: flex; flex-direction: column; gap: var(--space-4); }
.swatch.cq-swatch { background: var(--c, var(--n2)); }
.swatch.cq-swatch.is-hatch { background: transparent; box-shadow: inset 0 0 0 1.5px var(--c); background-image: repeating-linear-gradient(135deg, var(--c) 0 2px, transparent 2px 4px); }
.cq-home-shortcut .more-link { white-space: nowrap; }
.cq-start { align-self: flex-start; }

/* ---------- «Para onde foi» ao lado do gráfico do Histórico «Dia» (cq-origem.js) ---------- */
.cq-origem { display: flex; flex-direction: column; gap: var(--space-2); }
.cq-origem-t { margin: 0; font-size: var(--fs-body); line-height: 22px; font-weight: 600; }
.cq-origem-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: var(--touch); }
.cq-origem-when { margin: 0; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--space-2); font-size: var(--fs-small); line-height: 20px; color: var(--text-muted); }
.cq-origem-total { font-size: var(--fs-body); line-height: 22px; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cq-origem-all { flex-shrink: 0; min-height: var(--touch); }
.cq-origem-sub { margin: 0; font-size: var(--fs-small); line-height: 20px; color: var(--text-muted); }
.cq-row.is-compact { display: grid; grid-template-columns: 12px minmax(0, 1fr) 64px 84px 20px; column-gap: var(--space-3); align-items: center; min-height: 44px; color: var(--text); text-decoration: none; border-radius: 10px; }
@media (max-width: 599px) {
	/* 360 px: as faixas do computador deixavam ~70 px ao nome. A mini-barra fica só com a %. */
	.cq-row.is-compact { grid-template-columns: 12px minmax(0, 1fr) 40px 76px 16px; column-gap: 8px; }
	.cq-row.is-compact .cq-line { display: none; }
}
.cq-row.is-compact .cq-sw { align-self: center; margin-top: 0; }
.cq-row.is-compact .cq-t { font-weight: 400; overflow-wrap: break-word; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; } /* até duas linhas; a altura não muda ao escolher outra barra */
.cq-row.is-compact .cq-s { height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cq-row.is-compact .cq-barline { margin-top: 0; gap: 4px; }
.cq-row.is-compact .cq-pc { width: 36px; white-space: nowrap; font-size: 13px; }
.cq-row.is-compact .cq-line { min-width: 20px; }
.cq-row.is-compact .cq-val { align-self: center; }
.cq-row.is-compact .cq-k { font-size: 15px; }
.cq-row.is-compact:focus-visible { outline-offset: 2px; }
.cq-muted { color: var(--text-muted); }
@media (hover: hover) { .cq-row.is-compact:hover { background: var(--surface-2); } }
.cq-origem-foot { margin: 0; min-height: 20px; font-size: var(--fs-small); line-height: 20px; color: var(--text-muted); }
.cq-origem-wait { display: flex; flex-direction: column; }
.cq-origem-ph { height: 44px; border-top: 1px solid var(--hairline); }
.cq-origem-wait > .cq-origem-ph:first-child { border-top: 0; }
@media (max-width: 599px) { .cq-origem-foot { min-height: 40px; } } /* a frase mais longa ocupa duas linhas a 360 px: o painel não salta */
