/* Painel visual (2026-10-15): faixa de estado, números por período, fluxo, atividade, provedoras e
   combos. Só tokens do tema (claro e escuro); as cores de série são as únicas próprias. */
:root .shell {
    --vx-in: var(--success);
    --vx-out: #1d4ed8;
    --vx-violet: #6d28d9;
    --vx-teal: #0f766e;
    --vx-amber: var(--warning);
}
.dark .shell {
    --vx-out: #60a5fa;
    --vx-violet: #a78bfa;
    --vx-teal: #2dd4bf;
}

.shell .vx-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    margin-bottom: 20px;
    padding: 14px 18px;
    border: 1px solid color-mix(in srgb, var(--success) 45%, transparent);
    border-radius: 12px;
    background: color-mix(in srgb, var(--success) 10%, transparent);
    color: var(--success-text, var(--success));
    font-weight: 600;
}
.shell .vx-status.warn {
    border-color: color-mix(in srgb, var(--warning) 50%, transparent);
    background: color-mix(in srgb, var(--warning) 10%, transparent);
    color: var(--warning-text, var(--warning));
}
.shell .vx-status svg { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.shell .vx-status small { margin-left: auto; font-size: 12px; font-weight: 500; opacity: .85; }

.shell .vx-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 20px 0 12px;
}
.shell .vx-section-head:first-child { margin-top: 0; }
.shell .vx-section-head h2 { margin: 0; font-size: 18px; }
.shell .vx-section-head p { margin: 4px 0 0; color: var(--pg-muted); font-size: 13px; }

.shell .vx-seg {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--pg-border);
    border-radius: 10px;
    background: var(--surface-sunken, var(--surface));
}
.shell .vx-seg button {
    min-height: 30px;
    padding: 0 12px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--pg-muted-strong);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.shell .vx-seg button[aria-pressed="true"] { background: var(--pg-accent); color: hsl(var(--primary-foreground)); }
.shell .vx-seg button:focus-visible { outline: 2px solid var(--pg-accent); outline-offset: 2px; }

.shell .vx-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.shell .vx-tile {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    padding: 12px 16px;
    border: 1px solid var(--pg-border);
    border-radius: 12px;
    background: var(--surface);
}
.shell .vx-tile > span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--pg-muted-strong);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.shell .vx-tile > span svg { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.shell .vx-tile strong { overflow-wrap: anywhere; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1.15; }
.shell .vx-tile small { color: var(--pg-muted); font-size: 12px; }
.shell .vx-in { color: var(--vx-in); }
.shell .vx-out { color: var(--vx-out); }
.shell .vx-amber { color: var(--vx-amber); }
.shell .vx-violet { color: var(--vx-violet); }
.shell .vx-bad { color: var(--danger); }

.shell .vx-flow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: 16px;
    border: 1px solid var(--pg-border);
    border-radius: 12px;
    background: var(--surface);
}
.shell .vx-node {
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--pg-border-strong);
    border-radius: 10px;
    background: var(--surface-raised);
    color: inherit;
    text-decoration: none;
}
.shell a.vx-node:hover { border-color: var(--pg-accent); }
.shell .vx-node span { color: var(--pg-muted-strong); font-size: 12px; }
.shell .vx-node strong { display: flex; align-items: center; gap: 8px; font-size: 22px; font-variant-numeric: tabular-nums; }
.shell .vx-node small { display: block; overflow: hidden; margin-top: 4px; color: var(--pg-muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.shell .vx-arrow { display: grid; place-items: center; color: var(--pg-muted); }
.shell .vx-arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }

.shell .vx-grid2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px; margin-top: 12px; }
.shell .vx-card { min-width: 0; padding: 18px; border: 1px solid var(--pg-border); border-radius: 12px; background: var(--surface); }
.shell .vx-card h3 { margin: 0 0 10px; color: var(--text); font-size: 15px; }
.shell .vx-card h3.vx-subhead { margin-top: 22px; }
.shell .vx-big { font-size: 22px; font-weight: 800; }
.shell .vx-meta { margin: 6px 0 0; color: var(--pg-muted); font-size: 12px; }
.shell .vx-meta b { color: var(--pg-muted-strong); font-weight: 600; }

.shell .vx-heat { display: grid; grid-auto-columns: 13px; grid-auto-flow: column; grid-template-rows: repeat(7, 13px); gap: 3px; overflow-x: auto; padding-bottom: 4px; }
.shell .vx-heat i { border-radius: 3px; background: color-mix(in srgb, var(--pg-border) 80%, transparent); }
.shell .vx-heat i.l1 { background: color-mix(in srgb, var(--success) 28%, transparent); }
.shell .vx-heat i.l2 { background: color-mix(in srgb, var(--success) 50%, transparent); }
.shell .vx-heat i.l3 { background: color-mix(in srgb, var(--success) 75%, transparent); }
.shell .vx-heat i.l4 { background: var(--success); }
.shell .vx-heat i.future { visibility: hidden; }

.shell .vx-dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--pg-muted); }
.shell .vx-dot.operating { background: var(--success); }
.shell .vx-dot.attention { background: var(--warning); }
.shell .vx-dot.idle { background: var(--pg-muted); }

.shell .vx-share { display: flex; height: 10px; overflow: hidden; margin: 4px 0 10px; border-radius: 999px; background: var(--pg-border); }
.shell .vx-share span:nth-child(4n+1) { background: hsl(var(--foreground) / .9); }
.shell .vx-share span:nth-child(4n+2) { background: hsl(var(--foreground) / .6); }
.shell .vx-share span:nth-child(4n+3) { background: hsl(var(--foreground) / .38); }
.shell .vx-share span:nth-child(4n+4) { background: hsl(var(--foreground) / .22); }
.shell .vx-legend { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 12px; }
.shell .vx-legend li { display: flex; align-items: center; gap: 8px; }
.shell .vx-legend li i { width: 10px; height: 10px; border-radius: 3px; }
.shell .vx-legend li:nth-child(4n+1) i { background: hsl(var(--foreground) / .9); }
.shell .vx-legend li:nth-child(4n+2) i { background: hsl(var(--foreground) / .6); }
.shell .vx-legend li:nth-child(4n+3) i { background: hsl(var(--foreground) / .38); }
.shell .vx-legend li:nth-child(4n+4) i { background: hsl(var(--foreground) / .22); }
.shell .vx-legend li span { margin-left: auto; color: var(--pg-muted); font-variant-numeric: tabular-nums; }

.shell .vx-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.shell .vx-pills button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 0 12px;
    border: 1px solid var(--pg-border);
    border-radius: 999px;
    background: transparent;
    color: var(--pg-muted-strong);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.shell .vx-pills button[aria-pressed="true"] { border-color: var(--pg-accent); background: var(--pg-accent); color: hsl(var(--primary-foreground)); }
.shell .vx-pills button:focus-visible { outline: 2px solid var(--pg-accent); outline-offset: 2px; }

.shell .vx-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.shell .vx-route {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 6px 12px;
    align-content: start;
    min-width: 0;
    padding: 14px 16px;
    border: 1px solid var(--pg-border);
    border-radius: 12px;
    background: var(--surface);
}
.shell .vx-route.attention { border-color: color-mix(in srgb, var(--warning) 50%, var(--pg-border)); }
.shell .vx-mark {
    display: grid;
    grid-row: span 3;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--pg-muted);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}
.shell .vx-mark { border: 1px solid var(--pg-border-strong); background: var(--surface-raised); color: var(--text); }
.shell .vx-route h3 { display: flex; align-items: center; gap: 8px; min-width: 0; margin: 0; font-size: 15px; }
.shell .vx-route h3 code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shell .vx-badge {
    justify-self: start;
    padding: 2px 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--pg-muted) 16%, transparent);
    color: var(--pg-muted-strong);
    font-size: 11px;
    font-weight: 700;
}
.shell .vx-badge.operating { background: color-mix(in srgb, var(--success) 15%, transparent); color: var(--success-text, var(--success)); }
.shell .vx-badge.attention { background: color-mix(in srgb, var(--warning) 15%, transparent); color: var(--warning-text, var(--warning)); }
.shell .vx-route .vx-meta { margin: 0; font-variant-numeric: tabular-nums; }
.shell .vx-route dl { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 6px 0 0; padding-top: 10px; border-top: 1px solid var(--pg-border); }
.shell .vx-route dl div { min-width: 0; }
.shell .vx-route dt { color: var(--pg-muted); font-size: 11px; }
.shell .vx-route dd { margin: 2px 0 0; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.shell .vx-clients { display: flex; flex-wrap: wrap; grid-column: 1 / -1; gap: 6px; }
.shell .vx-clients a {
    padding: 2px 8px;
    border: 1px solid var(--pg-border);
    border-radius: 6px;
    color: inherit;
    font-size: 12px;
    text-decoration: none;
}
.shell .vx-clients a:hover { border-color: var(--pg-accent); }

.shell .vx-combos { display: grid; gap: 12px; }
.shell .vx-combo {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 4px 14px;
    padding: 16px 18px;
    border: 1px solid var(--pg-border);
    border-radius: 12px;
    background: var(--surface);
}
.shell .vx-combo-icon {
    display: grid;
    grid-row: span 4;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--vx-violet) 18%, transparent);
    color: var(--vx-violet);
}
.shell .vx-combo-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.shell .vx-combo h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; font-size: 16px; }
.shell .vx-steps { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 0; padding: 0; list-style: none; }
.shell .vx-step { display: flex; align-items: flex-start; gap: 10px; min-width: 220px; padding: 10px 12px; border: 1px solid var(--pg-border-strong); border-radius: 10px; background: var(--surface-raised); }
.shell .vx-step.operating { border-color: color-mix(in srgb, var(--success) 45%, var(--pg-border)); }
.shell .vx-step.attention { border-color: color-mix(in srgb, var(--warning) 55%, var(--pg-border)); }
.shell .vx-step.empty { border-style: dashed; background: transparent; color: var(--pg-muted); }
.shell .vx-step b { display: block; font-size: 13px; }
.shell .vx-step small { color: var(--pg-muted); font-size: 12px; }
.shell .vx-step-n { display: grid; flex: none; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); font-size: 12px; font-weight: 700; }
.shell .vx-tag { padding: 2px 7px; border-radius: 5px; font-family: var(--font-sans, inherit); font-size: 10px; font-weight: 800; letter-spacing: .06em; }
.shell .vx-tag.vx-fixed { background: var(--surface-raised); color: var(--pg-muted-strong); }
.shell .vx-chain { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.shell .vx-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    border: 1px solid var(--pg-border);
    border-radius: 6px;
    background: var(--surface-raised);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 12px;
}
.shell .vx-chip em { color: var(--pg-muted); font-style: normal; }
.shell .vx-note {
    margin: 0 0 16px;
    padding: 10px 14px;
    border: 1px solid color-mix(in srgb, var(--vx-violet) 30%, transparent);
    border-radius: 10px;
    background: color-mix(in srgb, var(--vx-violet) 7%, transparent);
    color: var(--pg-muted-strong);
    font-size: 13px;
}
.shell .vx-empty { padding: 18px; border: 1px dashed var(--pg-border); border-radius: 12px; color: var(--pg-muted); }

/* Cliente: prontidão e saldo à vista, o modelo em preparação recolhido. */
.shell .vx-ready { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; }
.shell .vx-ready div { min-width: 0; padding-top: 10px; border-top: 1px solid var(--pg-border); }
.shell .vx-ready dt { margin-bottom: 6px; color: var(--pg-muted); font-size: 12px; }
.shell .vx-ready dd { margin: 0; }
.shell .vx-ready a { margin-left: 6px; font-size: 12px; }
.shell .vx-prep > summary {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    padding: 16px 18px;
    border: 1px solid var(--pg-border);
    border-radius: 12px;
    background: var(--surface);
    font-weight: 700;
    cursor: pointer;
}
.shell .vx-prep > summary small { color: var(--pg-muted); font-weight: 500; }
.shell .vx-prep[open] > summary { margin-bottom: 16px; }

@media (max-width: 1599px) {
    .shell .vx-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1200px) {
    .shell .vx-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
    .shell .vx-flow { grid-template-columns: minmax(0, 1fr); }
    .shell .vx-arrow { justify-self: center; transform: rotate(90deg); }
    .shell .vx-grid2 { grid-template-columns: minmax(0, 1fr); }
    .shell .vx-cards { grid-template-columns: minmax(0, 1fr); }
    .shell .vx-ready { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .shell .vx-heat i:nth-child(-n+91) { display: none; }
    .shell .vx-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .shell .vx-tile strong { font-size: 20px; }
    .shell .vx-status small { margin-left: 0; }
}

/* Pool e combos (2026-10-15, entrega A). */
.shell .vx-card-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.shell .vx-combo .vx-card-actions { grid-column: 2; }
.shell .vx-tag.vx-configured { background: color-mix(in srgb, var(--vx-violet) 16%, transparent); color: var(--vx-violet); }
.shell .vx-combo-editor { display: grid; gap: 14px; }
.shell .vx-editor-block { display: grid; gap: 10px; margin: 0; padding: 14px; border: 1px solid var(--pg-border); border-radius: 12px; }
.shell .vx-editor-block legend { padding: 0 6px; font-weight: 700; }
.shell .vx-editor-steps { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.shell .vx-editor-step {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto auto;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid var(--pg-border);
    border-radius: 10px;
    background: var(--surface-raised);
}
.shell .vx-editor-step-name b { display: block; font-size: 13px; }
.shell .vx-editor-step-name small { color: var(--pg-muted); font-size: 12px; }
.shell .vx-weight { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.shell .vx-weight input { width: 64px; }
.shell .vx-inline-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.shell .vx-step-actions { display: flex; gap: 4px; }
.shell .vx-step-actions button {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--pg-border);
    border-radius: 8px;
    background: var(--surface);
    color: inherit;
    cursor: pointer;
}
.shell .vx-step-actions button:disabled { opacity: .4; cursor: default; }
.shell .vx-step-actions button:focus-visible { outline: 2px solid var(--pg-accent); outline-offset: 2px; }
.shell .vx-step-actions svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.shell .vx-editor-add { display: flex; flex-wrap: wrap; gap: 8px; }
.shell .vx-editor-add select { flex: 1 1 260px; min-height: 38px; }
.shell .vx-problems {
    margin: 0;
    padding: 10px 14px 10px 30px;
    border: 1px solid hsl(var(--destructive) / .45);
    border-radius: 10px;
    background: hsl(var(--destructive) / .08);
    color: hsl(var(--foreground));
    font-size: 13px;
}
@media (max-width: 640px) {
    .shell .vx-editor-step { grid-template-columns: auto minmax(0, 1fr); }
    .shell .vx-editor-step > :nth-child(n+3) { grid-column: 2; }
}
/* Cartão de combo: tudo que não é o ícone fica na coluna do conteúdo, qualquer que seja o número de linhas. */
.shell .vx-combo > :not(.vx-combo-icon) { grid-column: 2; }
.shell .vx-combo > .vx-combo-icon { grid-row: 1; grid-column: 1; }
.shell .provider-modal-form fieldset.vx-editor-block { margin-top: 6px; padding: 12px 14px 14px; border: 1px solid var(--pg-border); border-radius: 12px; }
.shell .provider-modal-form fieldset.vx-editor-block > legend { padding: 0 6px; font-size: 14px; font-weight: 700; }

/* Combo ativo × salvo (2026-10-15, entrega B). */
.shell .vx-tag.vx-on { background: color-mix(in srgb, var(--success) 16%, transparent); color: var(--success-text, var(--success)); }
.shell .vx-warn { margin: 6px 0 0; padding: 8px 12px; border: 1px solid color-mix(in srgb, var(--warning) 45%, var(--pg-border)); border-radius: 10px; background: color-mix(in srgb, var(--warning) 8%, transparent); font-size: 12px; }
.shell .vx-confirm { align-self: center; color: var(--pg-muted-strong); font-size: 13px; }
