:root {
    color-scheme: dark;
    --stadium-ink: #050806;
    --stadium-night: #07110d;
    --stadium-panel: rgba(13, 25, 20, 0.88);
    --stadium-panel-strong: rgba(17, 34, 27, 0.96);
    --stadium-line: rgba(244, 241, 232, 0.1);
    --stadium-line-strong: rgba(244, 241, 232, 0.18);
    --stadium-chalk: #f4f1e8;
    --stadium-muted: #8fa49a;
    --stadium-green: #18a558;
    --stadium-green-soft: rgba(24, 165, 88, 0.16);
    --stadium-red: #e53935;
    --stadium-red-soft: rgba(229, 57, 53, 0.16);
    --stadium-amber: #ffc247;
    --stadium-amber-soft: rgba(255, 194, 71, 0.14);
    --stadium-blueprint: #5be2b0;
    --stadium-shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
    --stadium-radius: 8px;
    --stadium-pad: 0.78rem;   /* padding interno dos painéis (densidade compacta) */
    --stadium-gap: 0.6rem;    /* espaçamento entre painéis */
    --stadium-mono: "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    --stadium-condensed: "Bahnschrift Condensed", "Arial Narrow", "Segoe UI", sans-serif;
    --stadium-ui: "Aptos", "Segoe UI", system-ui, sans-serif;
}

html,
body {
    min-height: 100%;
    background:
        radial-gradient(circle at 78% 0%, rgba(255, 194, 71, 0.14), transparent 28rem),
        radial-gradient(circle at 18% 18%, rgba(24, 165, 88, 0.16), transparent 24rem),
        linear-gradient(135deg, #040604 0%, #07110d 44%, #020403 100%);
    color: var(--stadium-chalk);
    font-family: var(--stadium-ui);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        linear-gradient(90deg, transparent calc(50% - 1px), rgba(244, 241, 232, 0.055) 50%, transparent calc(50% + 1px)),
        radial-gradient(ellipse at 50% 50%, transparent 0 24%, rgba(244, 241, 232, 0.045) 24.3% 24.8%, transparent 25.1%),
        repeating-linear-gradient(90deg, rgba(244, 241, 232, 0.035) 0 1px, transparent 1px 96px);
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.08));
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.18;
    background-image:
        linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 28px 28px;
}

a,
.btn-link {
    color: var(--stadium-blueprint);
}

a:hover,
.btn-link:hover {
    color: var(--stadium-amber);
}

.btn {
    border-radius: 6px;
    font-weight: 700;
    letter-spacing: 0;
}

.btn-primary {
    color: #031008;
    background: linear-gradient(180deg, #28d275, var(--stadium-green));
    border-color: rgba(84, 245, 153, 0.8);
    box-shadow: 0 10px 24px rgba(24, 165, 88, 0.24);
}

.btn-primary:hover,
.btn-primary:focus {
    color: #021006;
    background: linear-gradient(180deg, #38e384, #17b35e);
    border-color: rgba(134, 255, 188, 0.95);
}

.btn-outline-secondary {
    color: var(--stadium-chalk);
    border-color: var(--stadium-line-strong);
    background-color: rgba(244, 241, 232, 0.03);
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
    color: var(--stadium-chalk);
    border-color: rgba(255, 194, 71, 0.55);
    background-color: var(--stadium-amber-soft);
}

.btn-danger,
.btn-outline-danger:hover {
    background: linear-gradient(180deg, #ff5b58, var(--stadium-red));
    border-color: rgba(255, 118, 115, 0.78);
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.12rem rgba(5, 8, 6, 0.94), 0 0 0 0.28rem rgba(255, 194, 71, 0.62);
}

.content {
    padding-top: 1.25rem;
}

/* /admin — cabeçalho dos grupos de parâmetros (botão .btn puro herda cinza-escuro do Bootstrap) */
.param-group-toggle,
.param-group-toggle strong {
    color: var(--stadium-chalk);
}

.param-group-toggle:hover,
.param-group-toggle:hover strong {
    color: var(--stadium-amber);
}

h1,
h2,
h3,
h4,
.display-5 {
    font-family: var(--stadium-condensed);
    letter-spacing: 0;
    text-transform: uppercase;
}

h1:focus {
    outline: none;
}

.text-muted {
    color: var(--stadium-muted) !important;
}

.card,
.stadium-panel {
    color: var(--stadium-chalk);
    background:
        linear-gradient(180deg, rgba(244, 241, 232, 0.035), transparent 42%),
        var(--stadium-panel);
    border: 1px solid var(--stadium-line);
    border-radius: var(--stadium-radius);
    box-shadow: var(--stadium-shadow);
}

.card-body {
    background: transparent;
}

.table {
    --bs-table-color: var(--stadium-chalk);
    --bs-table-bg: transparent;
    --bs-table-border-color: rgba(244, 241, 232, 0.08);
    --bs-table-striped-bg: rgba(244, 241, 232, 0.025);
    --bs-table-hover-bg: rgba(255, 194, 71, 0.055);
    margin-bottom: 0;
    color: var(--stadium-chalk);
}

.table th {
    color: var(--stadium-muted);
    border-bottom-color: var(--stadium-line-strong);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.table td {
    vertical-align: middle;
}

.form-control,
.form-select {
    color: var(--stadium-chalk);
    background-color: rgba(1, 7, 4, 0.68);
    border-color: var(--stadium-line-strong);
    border-radius: 6px;
}

.form-control:focus,
.form-select:focus {
    color: var(--stadium-chalk);
    background-color: rgba(4, 14, 9, 0.92);
    border-color: rgba(255, 194, 71, 0.62);
}

.form-label {
    color: var(--stadium-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.badge {
    border-radius: 999px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.bg-success {
    background-color: var(--stadium-green) !important;
}

.bg-secondary {
    background-color: rgba(143, 164, 154, 0.28) !important;
}

.text-success {
    color: #35df83 !important;
}

.text-danger {
    color: #ff6d69 !important;
}

.alert-info {
    color: var(--stadium-chalk);
    background: rgba(91, 226, 176, 0.12);
    border-color: rgba(91, 226, 176, 0.28);
}

.trading-desk {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    padding-bottom: 2rem;
}

.destaque-wrap {
    min-width: 0;
    overflow: hidden;
}

.desk-hero {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 1rem;
    overflow: hidden;
    padding: 1.1rem;
    position: relative;
}

.desk-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 78% 0%, rgba(255, 194, 71, 0.18), transparent 18rem),
        linear-gradient(90deg, rgba(24, 165, 88, 0.12), transparent 50%);
}

.desk-hero > * {
    position: relative;
    z-index: 1;
}

.eyebrow,
.panel-heading span,
.ticker-cell span,
.scoreboard-label {
    color: var(--stadium-muted);
    font-family: var(--stadium-mono);
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.desk-hero h1 {
    margin: 0.1rem 0;
    font-size: clamp(2rem, 4vw, 3.65rem);
    font-weight: 950;
    line-height: 0.88;
}

.desk-hero p {
    max-width: 46rem;
    margin: 0.45rem 0 0;
    color: var(--stadium-muted);
}

.scoreboard {
    display: grid;
    min-width: 12.5rem;
    align-content: center;
    justify-items: end;
    padding: 0.95rem;
    border: 1px solid rgba(255, 194, 71, 0.22);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 194, 71, 0.1), rgba(255, 194, 71, 0.025)),
        rgba(4, 9, 6, 0.74);
}

.scoreboard-state {
    font-family: var(--stadium-condensed);
    font-size: 2rem;
    font-weight: 950;
    line-height: 1;
    text-transform: uppercase;
}

.scoreboard-state.is-open {
    color: var(--stadium-green);
    text-shadow: 0 0 22px rgba(24, 165, 88, 0.5);
}

.scoreboard-state.is-closed {
    color: var(--stadium-red);
}

.scoreboard-time {
    margin-top: 0.32rem;
    color: var(--stadium-amber);
    font-family: var(--stadium-mono);
    font-size: 0.84rem;
    font-weight: 800;
}

.ticker-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.65rem;
}

.ticker-cell {
    min-width: 0;
    padding: 0.72rem 0.82rem;
    border: 1px solid rgba(244, 241, 232, 0.09);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(244, 241, 232, 0.035), transparent),
        rgba(7, 17, 13, 0.76);
}

.ticker-cell strong {
    display: block;
    overflow: hidden;
    color: var(--stadium-chalk);
    font-family: var(--stadium-mono);
    font-size: clamp(0.86rem, 1.2vw, 1.02rem);
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.desk-grid {
    display: grid;
    grid-template-columns: minmax(440px, 1.9fr) minmax(248px, 0.92fr) minmax(232px, 0.9fr);
    gap: var(--stadium-gap);
    align-items: start;
}

.asset-rail,
.book-stage,
.tape-stage,
.chart-stage,
.order-ticket,
.carteira-panel,
.destaque-wrap,
.open-orders {
    padding: var(--stadium-pad);
}

/* Coluna esquerda: book (altura fixa) sobre o gráfico (dominante) */
.desk-leftcol {
    display: flex;
    flex-direction: column;
    gap: var(--stadium-gap);
    min-width: 0;
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.6rem;
}

.panel-heading h2 {
    margin: 0.1rem 0 0;
    font-size: 1.05rem;
    font-weight: 950;
}

.panel-heading > strong {
    color: var(--stadium-amber);
    font-family: var(--stadium-mono);
}

.asset-list {
    display: grid;
    gap: 0.5rem;
    max-height: calc(100vh - 18rem);
    overflow: auto;
    padding-right: 0.2rem;
}

.asset-row {
    display: grid;
    grid-template-columns: 2.35rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.64rem;
    width: 100%;
    padding: 0.62rem;
    color: var(--stadium-chalk);
    text-align: left;
    background: rgba(244, 241, 232, 0.035);
    border: 1px solid rgba(244, 241, 232, 0.065);
    border-radius: 8px;
}

.asset-row:hover,
.asset-row.active {
    border-color: rgba(24, 165, 88, 0.34);
    background:
        linear-gradient(90deg, rgba(24, 165, 88, 0.16), rgba(255, 194, 71, 0.035));
}

.club-shield {
    display: grid;
    width: 2.35rem;
    height: 2.55rem;
    place-items: center;
    color: #07110d;
    background:
        linear-gradient(180deg, #f4f1e8, #a8b9ae);
    border-radius: 8px 8px 12px 12px;
    clip-path: polygon(12% 0, 88% 0, 88% 70%, 50% 100%, 12% 70%);
    font-family: var(--stadium-mono);
    font-size: 0.7rem;
    font-weight: 950;
}

.asset-copy {
    display: grid;
    min-width: 0;
}

.asset-copy strong {
    overflow: hidden;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.asset-copy small {
    color: var(--stadium-muted);
    font-family: var(--stadium-mono);
    font-size: 0.68rem;
}

.asset-price {
    color: var(--stadium-amber);
    font-family: var(--stadium-mono);
    font-weight: 900;
}

.book-heading {
    align-items: start;
}

.book-tabs {
    display: inline-flex;
    overflow: hidden;
    border: 1px solid rgba(244, 241, 232, 0.1);
    border-radius: 7px;
    background: rgba(1, 7, 4, 0.5);
}

.book-tabs button {
    min-width: 5.5rem;
    padding: 0.45rem 0.64rem;
    color: var(--stadium-muted);
    background: transparent;
    border: 0;
    font-size: 0.78rem;
    font-weight: 850;
}

.book-tabs button.active {
    color: #06100b;
    background: var(--stadium-amber);
}

.book-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.55rem;
    margin-bottom: 0.85rem;
}

.book-metrics > div {
    min-width: 0;
    padding: 0.42rem 0.55rem;
    border: 1px solid rgba(244, 241, 232, 0.08);
    border-radius: 7px;
    background: rgba(244, 241, 232, 0.03);
}

.book-metrics span {
    display: block;
    overflow: hidden;
    color: var(--stadium-muted);
    font-size: 0.6rem;
    font-weight: 800;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.book-metrics strong {
    display: block;
    overflow: hidden;
    font-size: 0.88rem;
    text-overflow: ellipsis;
    white-space: nowrap; /* valores $ longos elipsam em vez de quebrar a linha */
}

.book-metrics strong,
.mono,
.price {
    font-family: var(--stadium-mono);
    font-weight: 900;
}

/* Mini-carteira do desk: 2×2 na coluna lateral (era estilo inline no markup;
   virou classe para o mobile poder empilhar em 1 coluna). */
.carteira-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.positive {
    color: #35df83 !important;
}

.negative {
    color: #ff6d69 !important;
}

/* Linha superior da coluna esquerda: painel Times & Trades | painel Book de ofertas.
   A altura da linha vem do book (ladder fixa); o tape estica para acompanhar
   (flex-basis 0: o conteúdo do tape nunca dita a altura da linha). */
.book-row {
    display: grid;
    grid-template-columns: minmax(17rem, 1fr) minmax(0, 1.4fr);
    gap: var(--stadium-gap);
    min-width: 0;
    align-items: stretch;
}

.tape-stage {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.tape-scroll {
    flex: 1 1 0;
    min-height: 0;
    border: 1px solid rgba(244, 241, 232, 0.07);
    border-radius: 8px;
    background: rgba(1, 7, 4, 0.35);
}

/* Faixa melhor compra · spread · melhor venda */
.book-spread {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 0.7rem;
    padding: 0.4rem 0.72rem;
    border: 1px solid rgba(244, 241, 232, 0.07);
    border-radius: 7px;
    background: rgba(1, 7, 4, 0.35);
}

.book-spread .bs-side {
    display: inline-flex;
    align-items: baseline;
    gap: 0.45rem;
    min-width: 0;
}

.book-spread .bs-side > span {
    color: var(--stadium-muted);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.book-spread strong {
    font-family: var(--stadium-mono);
    font-size: 0.95rem;
    font-weight: 900;
}

.book-spread .bs-mid strong {
    color: var(--stadium-amber);
}

/* Ladder combinada estilo B3: bids à esquerda, asks à direita, rolagem única */
.ladder-combined {
    height: 16.5rem; /* book com tamanho fixo: excedente rola */
    border: 1px solid rgba(244, 241, 232, 0.07);
    border-radius: 8px;
    background: rgba(1, 7, 4, 0.35);
}

.ladder-scroll {
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(244, 241, 232, 0.22) transparent;
}

.ladder-scroll::-webkit-scrollbar {
    width: 8px;
}

.ladder-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.ladder-scroll::-webkit-scrollbar-thumb {
    background: rgba(244, 241, 232, 0.18);
    border-radius: 4px;
}

.ladder-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(244, 241, 232, 0.32);
}

.ladder-scroll .ladder-table {
    margin-bottom: 0;
}

/* Book e tape (Times & Trades): largura fixa por coluna — as colunas não mudam de
   tamanho conforme o dado e a tabela respeita a faixa em vez de crescer ao
   min-content; preços elipsam dentro da célula. As larguras exatas vêm do
   <colgroup> de cada tabela. */
.ladder-combined .ladder-table,
.tape-scroll .ladder-table {
    table-layout: fixed;
    width: 100%;
}

/* Células de preço: chip fixo + barra de profundidade separada atrás (--df: 0..1).
   A barra parte do chip e cresce para a borda externa; o chip nunca a mascara. */
.pill-cell {
    position: relative;
    width: 24%;
    isolation: isolate;
}

.bid-cell {
    text-align: right;
}

.pill-cell[style]::before {
    content: "";
    position: absolute;
    top: 0.24rem;
    bottom: 0.24rem;
    z-index: 0;
    /* largura proporcional à profundidade (--df 0..1, escala √): ordem maior = barra
       maior. Mínimo de 0.5rem para a menor ordem aparecer; teto = largura da célula. */
    width: max(0.5rem, calc(var(--df, 0) * (100% - 0.7rem)));
    border-radius: 4px;
}

.bid-cell[style]::before {
    right: 0.35rem;
    background: linear-gradient(270deg, rgba(24, 165, 88, 0.45), rgba(24, 165, 88, 0.06));
}

.ask-cell[style]::before {
    left: 0.35rem;
    background: linear-gradient(90deg, rgba(229, 57, 53, 0.45), rgba(229, 57, 53, 0.06));
}

/* Preço sem chip sólido: só o texto sobre a barra gradiente de profundidade */
.price-pill {
    position: relative;
    z-index: 1;
    display: inline-block;
    min-width: 3.4rem;
    padding: 0.16rem 0.5rem;
    border: 0;
    border-radius: 4px;
    background: transparent;
    font-family: var(--stadium-mono);
    font-size: 0.8rem;
    font-weight: 900;
    text-align: center;
}

.price-pill.bid {
    color: #35df83;
}

.price-pill.ask {
    color: #ff6d69;
}

.price-pill:hover {
    color: var(--stadium-amber);
}

.price-pill:focus-visible {
    outline: 1px solid var(--stadium-amber);
}

.qty-cell {
    font-family: var(--stadium-mono);
    font-size: 0.78rem;
}

/* Bolinha de NÍVEL mensal do jogador (F4: Sardinha/Op. Júnior/Tr. Sênior/Tubarão) —
   camada social: ranking, perfil, home e carteira. O book é anônimo e não a usa. */
.tier-dot {
    font-size: 0.6rem;
    line-height: 1;
    margin-right: 0.25rem;
    vertical-align: middle;
}

.tier-dot.nivel-sardinha { color: var(--stadium-chalk); }
.tier-dot.nivel-junior { color: var(--stadium-green); }
.tier-dot.nivel-senior { color: var(--stadium-amber); }
.tier-dot.nivel-tubarao { color: var(--stadium-red, #ff6d69); }

/* Marca de quebra (F3): † ao lado do nome (perfil público) — vale só na temporada corrente. */
.ruin-mark {
    color: var(--stadium-red, #ff6d69);
    font-weight: 700;
    margin-left: 0.2rem;
}

/* Cabeçalho da tabela fixo durante a rolagem */
.ladder-scroll thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #0a140f;
    box-shadow: 0 1px 0 rgba(244, 241, 232, 0.08);
}

.ladder-table {
    font-size: 0.8rem;
}

.ladder-table td,
.ladder-table th {
    padding: 0.32rem 0.45rem;
}

.pin-badge {
    display: inline-grid;
    min-width: 1.32rem;
    height: 1.32rem;
    place-items: center;
    margin-left: 0.25rem;
    border: 1px solid rgba(255, 194, 71, 0.32);
    border-radius: 999px;
    background: rgba(255, 194, 71, 0.1);
    font-size: 0.75rem;
}

.ticket-note {
    margin: 0.5rem 0 1rem;
    color: var(--stadium-muted);
    font-size: 0.86rem;
}

.side-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.48rem;
    margin-bottom: 1rem;
}

.side-switch button {
    min-height: 2.6rem;
    color: var(--stadium-muted);
    background: rgba(244, 241, 232, 0.035);
    border: 1px solid rgba(244, 241, 232, 0.09);
    border-radius: 7px;
    font-weight: 900;
    text-transform: uppercase;
}

.side-switch button.active.buy {
    color: #031008;
    background: var(--stadium-green);
    border-color: rgba(84, 245, 153, 0.8);
}

.side-switch button.active.sell {
    color: #fff;
    background: var(--stadium-red);
    border-color: rgba(255, 118, 115, 0.8);
}

.trade-input {
    min-height: 2.25rem;
    font-family: var(--stadium-mono);
    font-size: 0.92rem;
    font-weight: 850;
}

/* ===== Ticket de ordem (estilo terminal / print) ===== */
.ticket-seg {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}

.ticket-seg button {
    min-height: 2.7rem;
    border-radius: 8px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--stadium-muted);
    background: rgba(244, 241, 232, 0.04);
    border: 1px solid rgba(244, 241, 232, 0.09);
}

.ticket-seg button.buy.on {
    color: #031008;
    background: var(--stadium-green);
    border-color: var(--stadium-green);
}

.ticket-seg button.sell.on {
    color: #fff;
    background: var(--stadium-red);
    border-color: var(--stadium-red);
}

.ticket-label {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--stadium-muted);
    margin: 0.4rem 0 0.2rem;
}

.ticket-field {
    width: 100%;
    min-height: 2.05rem;
}

.stepper {
    display: grid;
    grid-template-columns: 2.2rem 1fr 2.2rem;
    gap: 0.35rem;
}

.stepper button {
    font-size: 1.15rem;
    font-weight: 700;
    color: #f4f1e8;
    background: rgba(244, 241, 232, 0.05);
    border: 1px solid rgba(244, 241, 232, 0.10);
    border-radius: 7px;
}

.stepper button:hover {
    background: rgba(244, 241, 232, 0.10);
}

.stepper input {
    min-width: 0; /* deixa o input encolher: os botões −/+ nunca são cortados pela borda */
    text-align: center;
    min-height: 2.05rem;
    border-radius: 7px;
    font-family: var(--stadium-mono);
    font-size: 1.05rem;
    font-weight: 850;
    color: inherit;
    background: rgba(244, 241, 232, 0.04);
    border: 1px solid rgba(244, 241, 232, 0.12);
}

.stepper input:focus {
    outline: none;
    border-color: var(--stadium-green);
}

.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.stepper input {
    -moz-appearance: textfield;
    appearance: textfield;
}

.qty-quick {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.4rem;
    margin-top: 0.35rem;
}

.qty-quick button {
    min-height: 1.9rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--stadium-muted);
    background: rgba(244, 241, 232, 0.04);
    border: 1px solid rgba(244, 241, 232, 0.10);
    border-radius: 7px;
}

.qty-quick button:hover {
    color: #f4f1e8;
    background: rgba(244, 241, 232, 0.09);
}

.ticket-position {
    margin-top: 0.55rem;
    border-top: 1px solid rgba(244, 241, 232, 0.09);
    padding-top: 0.45rem;
}

/* .ticket-row (não usar "row": colide com o grid do Bootstrap e empilha label/valor) */
.ticket-position .ticket-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.13rem 0;
}

.ticket-position .ticket-row span {
    color: var(--stadium-muted);
    font-size: 0.82rem;
}

.ticket-position .ticket-row strong {
    font-family: var(--stadium-mono);
    font-weight: 850;
}

.ticket-position .ticket-row strong.pos {
    color: var(--stadium-green);
}

.ticket-position .ticket-row strong.neg {
    color: var(--stadium-red);
}

.ticket-summary {
    margin: 0.5rem 0 0.3rem;
    border-top: 1px solid rgba(244, 241, 232, 0.09);
    padding-top: 0.45rem;
}

.ticket-summary .ticket-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.13rem 0;
}

.ticket-summary .ticket-row span {
    color: var(--stadium-muted);
    font-size: 0.82rem;
}

.ticket-summary .ticket-row strong {
    font-family: var(--stadium-mono);
    font-weight: 850;
}

.ticket-summary .ticket-row.total {
    margin-top: 0.3rem;
    border-top: 1px dashed rgba(244, 241, 232, 0.12);
    padding-top: 0.5rem;
}

.ticket-summary .ticket-row.total span {
    color: #f4f1e8;
    font-weight: 700;
}

.ticket-summary .ticket-row.total strong {
    font-size: 1.05rem;
}

.ticket-summary .ticket-row.total strong.buy {
    color: var(--stadium-green);
}

.ticket-summary .ticket-row.total strong.sell {
    color: var(--stadium-red);
}

.ticket-action {
    width: 100%;
    min-height: 2.3rem;
    margin-top: 0.4rem;
    border: none;
    border-radius: 9px;
    font-weight: 900;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.ticket-action.buy {
    color: #031008;
    background: var(--stadium-green);
}

.ticket-action.sell {
    color: #fff;
    background: #d32f2f; /* contraste 5:1 com texto branco (AA) */
}

/* Resultado da ordem: a caixa CRESCE com a mensagem (as frases do Modo Rápido têm 2–3 linhas) —
   nada de altura fixa, que cortava/sobrepunha o texto. A nota "Caixa · Tokens" flui abaixo dela.
   Sem mensagem o slot fica vazio e recolhe (só a margem), sem reservar um vão morto. */
.ticket-alert-slot {
    margin: 0.45rem 0 0.55rem;
}

.ticket-alert-slot:empty {
    margin: 0;
}

.ticket-alert {
    width: 100%;
    padding: 0.45rem 0.6rem;
    border: 1px solid rgba(91, 226, 176, 0.28);
    border-radius: 6px;
    background: rgba(91, 226, 176, 0.12);
    color: var(--stadium-chalk);
    font-size: 0.78rem;
    line-height: 1.4;
}

.ticket-action:hover {
    filter: brightness(1.07);
}

.ticket-action:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* ===== Recarga entre operações (order_throttle_seconds) =====
   Cadência mínima entre envio/cancelamento: o botão vira um "cooldown" de jogo — esmaece e uma
   película clara DRENA da esquerda para a direita no tempo da janela cheia (var(--cd), setado
   inline pela boleta). O rótulo mostra a contagem; quem garante a trava é o servidor. */
.ticket-action.cooling {
    position: relative;
    overflow: hidden;
    cursor: wait;
    font-variant-numeric: tabular-nums; /* contagem sem "dança" de largura */
}

.ticket-action.cooling::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.22);
    transform-origin: left center;
    animation: cd-sweep var(--cd, 3s) linear forwards;
    pointer-events: none;
}

@keyframes cd-sweep {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}

/* Cancelar em recarga: o ✕ vira a contagem ("2s") no mesmo botão — sem mudar o layout da linha. */
.btn-cancel.cooling {
    cursor: wait;
    font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
    .ticket-action.cooling::after { animation: none; }
}

/* ===== Boleta — Modo Rápido (sem campo de preço) ===== */
/* Lado da ordem: dois botões grandes com narrativa de torcida (título + subtítulo). */
.qt-sides {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin: 0.5rem 0 0.2rem;
}

.qt-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.12rem;
    min-height: 3.3rem;
    padding: 0.4rem 0.3rem;
    border-radius: 9px;
    background: rgba(244, 241, 232, 0.035);
    border: 1.5px solid rgba(244, 241, 232, 0.09);
    color: var(--stadium-chalk);
}

.qt-side .t {
    font-weight: 900;
    font-size: 0.98rem;
    letter-spacing: 0.02em;
}

.qt-side .s {
    font-size: 0.7rem;
    color: var(--stadium-muted);
    text-align: center;
    line-height: 1.15;
}

.qt-side.buy .t {
    color: var(--stadium-green);
}

.qt-side.sell .t {
    color: var(--stadium-red);
}

.qt-side.buy.on {
    background: var(--stadium-green-soft);
    border-color: var(--stadium-green);
}

.qt-side.sell.on {
    background: var(--stadium-red-soft);
    border-color: var(--stadium-red);
}

.qt-side.on .s {
    color: var(--stadium-chalk);
}

/* Card da posição atual + botão de zerar. */
.qt-pos {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin: 0.55rem 0 0.1rem;
    padding: 0.5rem 0.6rem;
    border-radius: 8px;
    background: rgba(1, 7, 4, 0.42);
    border: 1px solid rgba(244, 241, 232, 0.09);
    font-size: 0.82rem;
    line-height: 1.35;
}

.qt-pos strong {
    font-family: var(--stadium-mono);
    font-weight: 850;
}

.qt-pos-day {
    display: block;
    color: var(--stadium-muted);
    font-size: 0.76rem;
}

.qt-pos-day.pos {
    color: var(--stadium-green);
}

.qt-pos-day.neg {
    color: var(--stadium-red);
}

.qt-pos button {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 0.4rem 0.7rem;
    border-radius: 7px;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--stadium-chalk);
    background: rgba(244, 241, 232, 0.05);
    border: 1px solid var(--stadium-line-strong);
}

.qt-pos button:hover {
    border-color: rgba(255, 194, 71, 0.55);
    background: var(--stadium-amber-soft);
}

/* Chips de quantidade (5 colunas: 10/100/500/1000/Máx). */
.qt-chips {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.34rem;
    margin-top: 0.35rem;
}

.qt-chips button {
    min-height: 2rem;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--stadium-muted);
    background: rgba(244, 241, 232, 0.04);
    border: 1px solid rgba(244, 241, 232, 0.10);
    border-radius: 7px;
}

.qt-chips button:hover {
    color: var(--stadium-chalk);
    background: rgba(244, 241, 232, 0.09);
}

.qt-chips button.on {
    color: #06100b;
    background: var(--stadium-amber);
    border-color: var(--stadium-amber);
}

.qt-chips button.warn.on {
    color: #2b0b0a;
    background: var(--stadium-red);
    border-color: var(--stadium-red);
}

/* Slider + número da quantidade. */
.qt-qtyrow {
    display: grid;
    grid-template-columns: 1fr 5.2rem;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.qt-qtyrow input[type="range"] {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(244, 241, 232, 0.14);
    border-radius: 3px;
    outline: none;
}

.qt-qtyrow input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: var(--stadium-chalk);
    border: 2px solid var(--stadium-green);
    cursor: pointer;
}

.qt-qtyrow input[type="range"]::-moz-range-thumb {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--stadium-chalk);
    border: 2px solid var(--stadium-green);
    cursor: pointer;
}

.qt-qtyrow input[type="number"] {
    min-width: 0;
    text-align: center;
    min-height: 2.1rem;
    border-radius: 7px;
    font-family: var(--stadium-mono);
    font-size: 1rem;
    font-weight: 850;
    color: inherit;
    background: rgba(244, 241, 232, 0.04);
    border: 1px solid rgba(244, 241, 232, 0.12);
}

.qt-qtyrow input[type="number"]:focus {
    outline: none;
    border-color: var(--stadium-green);
}

.qt-qtyrow input[type="number"]::-webkit-outer-spin-button,
.qt-qtyrow input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Resumo em uma frase de português (substitui a tabela de "valor do negócio"). */
.qt-summary {
    margin: 0.6rem 0 0.3rem;
    padding: 0.55rem 0.65rem;
    border-radius: 8px;
    background: rgba(1, 7, 4, 0.42);
    border: 1px solid rgba(244, 241, 232, 0.09);
    font-size: 0.86rem;
    line-height: 1.45;
}

.qt-summary strong {
    font-family: var(--stadium-mono);
    font-weight: 850;
    color: var(--stadium-chalk);
}

.qt-summary .muted {
    color: var(--stadium-muted);
    font-size: 0.78rem;
    margin-top: 0.15rem;
}

.qt-summary.warn {
    border-color: rgba(255, 194, 71, 0.4);
    background: var(--stadium-amber-soft);
}

.qt-alertline {
    margin-top: 0.2rem;
    color: var(--stadium-amber);
    font-size: 0.78rem;
    font-weight: 700;
}

/* Alerta de erro no slot de resultado (envio recusado). */
.ticket-alert.err {
    border-color: rgba(229, 57, 53, 0.4);
    background: var(--stadium-red-soft);
}

.open-orders {
    overflow: hidden;
}

.side-pill {
    display: inline-flex;
    align-items: center;
    min-height: 1.5rem;
    padding: 0.16rem 0.5rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.side-pill.buy {
    color: #95ffc2;
    background: var(--stadium-green-soft);
}

.side-pill.sell {
    color: #ffaaa7;
    background: var(--stadium-red-soft);
}

/* Aba Movimentação: pílula de status final da ordem */
.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.34rem;
    border-radius: 999px;
    font-size: 0.6rem;
    font-weight: 900;
    text-transform: uppercase;
    white-space: nowrap;
}

.status-pill.st-exec {
    color: #9bf3c0;
    background: var(--stadium-green-soft);
}

.status-pill.st-parc {
    color: #ffd98a;
    background: rgba(255, 194, 71, 0.16);
}

.status-pill.st-canc {
    color: var(--stadium-muted);
    background: rgba(244, 241, 232, 0.08);
}

/* Linha de escopo da Movimentação: chip do ativo + "Pregão de hoje" */
.orders-scope {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--stadium-muted);
    font-size: 0.7rem;
}

.orders-scope .scope-chip {
    padding: 0.12rem 0.5rem;
    color: var(--stadium-chalk);
    font-weight: 850;
    background: rgba(244, 241, 232, 0.06);
    border: 1px solid rgba(244, 241, 232, 0.12);
    border-radius: 999px;
}

/* Painel estreito: as duas abas (Abertas/Movimentação) cabem sem estourar a coluna; se faltar
   largura, caem para a linha de baixo (mesmo padrão do .chart-heading) — sem corte nem scroll. */
.open-orders .orders-heading {
    flex-wrap: wrap;
    gap: 0.5rem;
}

.open-orders .orders-heading .book-tabs button {
    min-width: 0;
    padding: 0.4rem 0.62rem;
    font-size: 0.72rem;
}

.loading-panel,
.empty-panel {
    padding: 1rem;
    color: var(--stadium-muted);
}

@media (max-width: 1180px) {
    .desk-grid {
        grid-template-columns: minmax(220px, 0.8fr) minmax(420px, 1.6fr);
    }

    .order-ticket {
        grid-column: 1 / -1;
    }

    /* Faixa de períodos do gráfico: pode quebrar linha e encolher em telas
       menores para não estourar a largura do painel (evita rolagem horizontal). */
    .chart-heading .book-tabs {
        flex-wrap: wrap;
        overflow: visible;
    }

    .chart-heading .book-tabs button {
        min-width: 0;
        flex: 1 1 auto;
    }
}

@media (max-width: 860px) {
    .desk-hero {
        flex-direction: column;
    }

    .scoreboard {
        justify-items: start;
    }

    /* minmax(0,1fr): a coluna nunca herda o min-content do filho mais largo
       (o cabeçalho do book estoura o viewport de celulares com 1fr puro). */
    .ticker-strip,
    .desk-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .desk-grid > *,
    .desk-leftcol > *,
    .desk-grid section {
        min-width: 0;
    }

    .book-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .asset-list {
        max-height: none;
    }

    .ladder-combined {
        height: 13rem;
    }

    /* T&T empilha sobre o book em telas estreitas */
    .book-row {
        grid-template-columns: 1fr;
    }

    .tape-scroll {
        height: 11rem;
        flex: 0 0 auto;
    }
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ===== Mercado terminal — Fase 1 (barra de topo, carteira, destaques) ===== */
.desk-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 1.1rem;
}

.topbar-pregao {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.topbar-dot {
    width: 0.72rem;
    height: 0.72rem;
    border-radius: 999px;
    background: var(--stadium-green);
    box-shadow: 0 0 12px rgba(24, 165, 88, 0.7);
}

.topbar-dot.is-closed {
    background: var(--stadium-red);
    box-shadow: 0 0 12px rgba(229, 57, 53, 0.6);
}

.topbar-state {
    font-family: var(--stadium-condensed);
    font-size: 1.45rem;
    font-weight: 950;
    line-height: 1;
    text-transform: uppercase;
}

.topbar-state.is-open {
    color: var(--stadium-green);
}

.topbar-state.is-closed {
    color: var(--stadium-red);
}

.topbar-window {
    color: var(--stadium-amber);
    font-family: var(--stadium-mono);
    font-size: 0.82rem;
    font-weight: 800;
}

.asset-tag {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Escudo do time selecionado, à esquerda do nome + último preço (canto superior
   direito do pregão). Altura casada com o bloco nome + preço; some sozinho quando
   o time não tem escudo cadastrado (o markup não renderiza a <img>). */
.asset-crest {
    flex: none;
    height: 2.7rem;
    width: auto;
    max-width: 3rem;
    object-fit: contain;
}

.asset-tag-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.1rem;
    overflow: hidden; /* permite o nome elipsar quando a barra de topo aperta */
}

.asset-tag-name {
    font-family: var(--stadium-condensed);
    font-size: 1.55rem;
    font-weight: 950;
    line-height: 1;
}

.asset-tag-price {
    color: var(--stadium-amber);
    font-family: var(--stadium-mono);
    font-size: 1.05rem;
    font-weight: 900;
}

.asset-tag-change {
    margin-left: 0.35rem;
    font-size: 0.8rem;
}

.asset-spark {
    width: 110px;
    height: 36px;
    opacity: 0.9;
}

.carteira-positions {
    max-height: 16rem;
    overflow-y: auto;
    overflow-x: hidden; /* nunca rola na horizontal: a tabela cabe na coluna */
}

/* Tabela de posições da Carteira: largura fixa por coluna para caber na coluna
   estreita sem rolagem horizontal — os números mantêm prioridade e o nome do
   ativo elipsa quando aperta. Nada de coluna ou funcionalidade removida. */
.carteira-positions .ladder-table {
    table-layout: fixed;
    width: 100%;
}

.carteira-positions .ladder-table th,
.carteira-positions .ladder-table td {
    padding: 0.3rem 0.32rem;
    font-size: 0.72rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.carteira-positions .ladder-table th:nth-child(1),
.carteira-positions .ladder-table td:nth-child(1) { width: 24%; } /* Ativo */
.carteira-positions .ladder-table th:nth-child(2),
.carteira-positions .ladder-table td:nth-child(2) { width: 14%; } /* Qtd */
.carteira-positions .ladder-table th:nth-child(3),
.carteira-positions .ladder-table td:nth-child(3) { width: 17%; } /* Base */
.carteira-positions .ladder-table th:nth-child(4),
.carteira-positions .ladder-table td:nth-child(4) { width: 26%; } /* Total */
.carteira-positions .ladder-table th:nth-child(5),
.carteira-positions .ladder-table td:nth-child(5) { width: 19%; } /* Var.% */

.chart-heading .book-tabs button {
    min-width: 4.6rem;
}

.destaque-strip {
    display: flex;
    gap: 0.65rem;
    overflow-x: auto;
    padding-bottom: 0.3rem;
}

.destaque-cell {
    flex: 0 0 auto;
    min-width: 9.5rem;
    display: grid;
    gap: 0.15rem;
    padding: 0.6rem 0.78rem;
    text-align: left;
    color: var(--stadium-chalk);
    border: 1px solid rgba(244, 241, 232, 0.09);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(244, 241, 232, 0.035), transparent),
        rgba(7, 17, 13, 0.76);
}

.destaque-cell span {
    color: var(--stadium-muted);
    font-family: var(--stadium-mono);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.destaque-cell strong {
    color: var(--stadium-chalk);
    font-family: var(--stadium-mono);
    font-size: 0.98rem;
    font-weight: 900;
}

.destaque-cell:hover,
.destaque-cell.active {
    border-color: rgba(24, 165, 88, 0.4);
    background: linear-gradient(90deg, rgba(24, 165, 88, 0.16), rgba(255, 194, 71, 0.04));
}

/* ===== Mercado: dashboard de tela cheia (1 viewport, sem rolagem) em telas grandes ===== */
@media (min-width: 1181px) {
    .trading-desk {
        /* sem a top-row do layout, sobra só o padding do .content */
        height: calc(100vh - 2.5rem);
        grid-template-rows: auto minmax(0, 1fr) auto;
        gap: var(--stadium-gap);
        padding-bottom: 0;
        overflow: hidden; /* dashboard cabe em 1 tela: a página nunca ganha rolagem vertical */
    }

    .desk-grid {
        height: 100%;
        min-height: 0;
        align-items: stretch;
        gap: var(--stadium-gap);
    }

    .desk-leftcol,
    .order-ticket,
    .desk-rightcol {
        min-height: 0;
        max-height: 100%;
    }

    .desk-leftcol {
        gap: var(--stadium-gap);
        overflow: hidden; /* o gráfico encolhe para caber em vez de empurrar a página */
    }

    /* Gráfico: painel dominante, absorve toda a altura sobrando */
    .chart-stage {
        display: flex;
        flex-direction: column;
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
    }

    /* Linha T&T + book: tamanho fixo, não disputa altura com o gráfico */
    .book-row {
        flex: 0 0 auto;
    }

    .order-ticket {
        overflow-y: auto; /* feedback de ordem nunca fica cortado */
        overflow-x: hidden;
    }

    .desk-rightcol {
        display: grid;
        grid-template-rows: minmax(0, 1.15fr) minmax(0, 0.85fr);
        gap: var(--stadium-gap);
    }

    .carteira-panel,
    .open-orders {
        display: flex;
        flex-direction: column;
        min-height: 0;
        overflow: hidden;
    }

    .carteira-panel .carteira-positions {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .open-orders .orders-scroll {
        flex: 1 1 auto;
        min-height: 0;
        overflow: auto;
    }

    /* Canvas preenche o painel do gráfico (autoSize na lib) */
    .chart-stage .chart-wrap {
        flex: 1 1 auto;
        min-height: 0;
    }

    .chart-stage .chart-canvas {
        height: 100%;
        min-height: 140px; /* piso menor: em telas baixas o gráfico encolhe sem estourar a tela */
    }
}

/* Correção de overflow horizontal no dashboard (tracks e itens podem encolher; conteúdo rola interno) */
@media (min-width: 1181px) {
    .desk-grid {
        /* coluna esquerda (T&T + book + gráfico) domina; ticket e carteira são apoio */
        grid-template-columns: minmax(0, 2.4fr) minmax(0, 0.95fr) minmax(0, 1fr);
    }

    .desk-leftcol,
    .chart-stage,
    .book-row,
    .book-stage,
    .tape-stage,
    .order-ticket,
    .desk-rightcol,
    .topbar-pregao,
    .asset-tag,
    .asset-tag-info,
    .ladder-combined,
    .carteira-panel .carteira-positions,
    .carteira-panel .book-metrics,
    .open-orders .orders-scroll {
        min-width: 0;
    }

    .asset-tag-name {
        max-width: 11rem; /* nome longo elipsa cedo e devolve largura às métricas */
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* Minhas ordens abertas: encolher conteúdo para caber sem rolagem horizontal */
.open-orders .orders-scroll table {
    width: 100%;
    table-layout: fixed; /* cabe na coluna sem cortar o botão de cancelar */
    font-size: 0.74rem;
}

.open-orders .orders-scroll .open-table th:nth-child(1),
.open-orders .orders-scroll .open-table td:nth-child(1) { width: 24%; } /* Time (quebra linha) */
.open-orders .orders-scroll .open-table th:last-child,
.open-orders .orders-scroll .open-table td:last-child { width: 2.4rem; } /* ✕ cancelar */

.open-orders .orders-scroll th,
.open-orders .orders-scroll td {
    padding: 0.3rem 0.36rem;
    white-space: nowrap;
}

.open-orders .orders-scroll .open-table th:first-child,
.open-orders .orders-scroll .open-table td:first-child {
    white-space: normal;
}

.open-orders .orders-scroll th {
    font-size: 0.62rem;
    letter-spacing: 0.04em;
}

.open-orders .side-pill {
    padding: 0.1rem 0.32rem;
    font-size: 0.6rem;
}

.open-orders .orders-scroll .btn {
    padding: 0.14rem 0.4rem;
    font-size: 0.68rem;
    line-height: 1.2;
}

/* Cancelar como ícone compacto (✕): mesma ação e tooltip, sem roubar largura */
.open-orders .orders-scroll .btn-cancel {
    width: 100%;
    min-width: 0;
    padding: 0.14rem 0;
    font-size: 0.82rem;
    line-height: 1;
}

@media (min-width: 1181px) {
    .open-orders .orders-scroll {
        overflow-x: hidden;
        overflow-y: auto;
    }
}

/* Métricas do dia no cabeçalho: pares label/valor com divisores finos (estilo terminal) */
.topbar-metrics {
    display: flex;
    flex: 1 1 auto;
    justify-content: center;
    min-width: 0;
    overflow: hidden;
}

.topbar-metrics > div {
    min-width: 0;
    padding: 0 0.6rem;
    border-left: 1px solid rgba(244, 241, 232, 0.1);
}

.topbar-metrics > div:first-child {
    border-left: 0;
}

.topbar-metrics span {
    display: block;
    color: var(--stadium-muted);
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.topbar-metrics strong {
    font-size: 0.92rem;
    white-space: nowrap;
}

@media (max-width: 1180px) {
    /* Faixa quebra para a segunda linha do topbar */
    .desk-topbar {
        flex-wrap: wrap;
    }

    .topbar-metrics {
        order: 3;
        width: 100%;
        flex-wrap: wrap;
        justify-content: flex-start;
        row-gap: 0.4rem;
        margin-top: 0.5rem;
        padding-top: 0.5rem;
        border-top: 1px solid rgba(244, 241, 232, 0.08);
    }
}

.chart-wrap {
    position: relative;
}

.chart-canvas {
    position: relative;
    width: 100%;
    height: 320px;
}

@media (max-width: 1180px) {
    .chart-canvas {
        height: 240px;
    }
}

/* Overlay exibido enquanto as velas do novo período carregam */
.chart-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 14, 12, 0.35);
    color: #8fa49a;
    font-size: 0.85rem;
    z-index: 3;
    pointer-events: none;
}

/* Legenda OHLC (segue o crosshair; sem hover, mostra a última vela) */
.chart-legend {
    position: absolute;
    top: 0.35rem;
    left: 0.5rem;
    display: flex;
    gap: 0.75rem;
    font-size: 0.72rem;
    color: #8fa49a;
    z-index: 2;
    pointer-events: none;
    white-space: nowrap;
}

.chart-legend .up {
    color: #18a558;
}

.chart-legend .down {
    color: #e53935;
}

/* Fase 2 — Destaques com variação + sparkline */
.destaque-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.4rem;
}

.destaque-cell em {
    font-style: normal;
    font-family: var(--stadium-mono);
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--stadium-muted);
}

.spark {
    display: block;
    width: 100%;
    height: 18px;
    margin-top: 0.2rem;
    color: var(--stadium-muted);
}

.spark polyline {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    vector-effect: non-scaling-stroke;
}

.spark.positive { color: #35df83; }
.spark.negative { color: #ff6d69; }

/* Pente fino do tema: alerts, bg-danger e badge temático */
.bg-danger {
    background-color: var(--stadium-red) !important;
}

.alert-success {
    color: var(--stadium-chalk);
    background: rgba(24, 165, 88, 0.14);
    border-color: rgba(24, 165, 88, 0.30);
}

.alert-warning {
    color: var(--stadium-chalk);
    background: rgba(255, 194, 71, 0.12);
    border-color: rgba(255, 194, 71, 0.30);
}

.alert-danger {
    color: var(--stadium-chalk);
    background: rgba(229, 57, 53, 0.12);
    border-color: rgba(229, 57, 53, 0.32);
}

.badge-fa {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-right: 0.3rem;
    padding: 0.22rem 0.55rem;
    border: 1px solid rgba(255, 194, 71, 0.30);
    border-radius: 999px;
    background: rgba(255, 194, 71, 0.10);
    color: var(--stadium-chalk);
    font-size: 0.72rem;
    font-weight: 700;
}

/* =========================================================================
   Carteira — migrada para CSS scoped (Components/Pages/Carteira.razor.css,
   prefixo wl-/wh-). Saíram daqui os blocos EXCLUSIVOS da Carteira
   (.wallet-*, .wb-*, .wh-*, .wl-row/caret/team/detail/d-item/totals,
   .equity-*, .margin-gauge, .wm-*, .wdb-*, .kpi-group). Abaixo ficam só
   utilitários COMPARTILHADOS por outras páginas (Perfil, Ranking, Prêmios,
   Home, Mercado, OrderTicket): .amber, .stadium-alert, .wl-chip, .kpi-cell,
   .use-bar.
   ========================================================================= */

.amber { color: var(--stadium-amber) !important; }

/* Pílulas de forma V/E/D (Estudo). Precisam ser globais: os spans nascem no
   RenderTreeBuilder (FormPills) e não recebem o atributo do CSS scoped. */
.form-pill {
    display: inline-flex;
    width: 0.95rem;
    height: 0.95rem;
    align-items: center;
    justify-content: center;
    flex: none;
    border-radius: 50%;
    font-size: 0.55rem;
    font-weight: 800;
}

.form-pill.v { background: var(--stadium-green-soft); color: #35df83; }
.form-pill.e { background: rgba(244, 241, 232, 0.08); color: var(--stadium-muted); }
.form-pill.d { background: var(--stadium-red-soft); color: #ff6d69; }

/* Faixa de alertas de estado (substitui os .alert do Bootstrap) */
.stadium-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.9rem 1rem;
    border-radius: var(--stadium-radius);
    border-left: 3px solid var(--stadium-muted);
    background: rgba(244, 241, 232, 0.04);
}

.stadium-alert .sa-icon {
    font-size: 0.9rem;
    line-height: 1.5;
}

.stadium-alert.is-danger {
    border-left-color: var(--stadium-red);
    background: var(--stadium-red-soft);
}

.stadium-alert.is-warn {
    border-left-color: var(--stadium-amber);
    background: var(--stadium-amber-soft);
}

.wl-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-family: var(--stadium-mono);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.wl-chip.ok {
    color: #95ffc2;
    background: var(--stadium-green-soft);
}

.wl-chip.mute {
    color: var(--stadium-muted);
    background: rgba(143, 164, 154, 0.16);
}

.kpi-cells {
    display: grid;
    gap: 0.45rem;
}

.kpi-cell {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
}

.kpi-cell span {
    color: var(--stadium-muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.kpi-cell strong {
    font-family: var(--stadium-mono);
    font-weight: 900;
    font-size: 0.95rem;
    white-space: nowrap;
}

.use-bar {
    display: inline-block;
    width: 100%;
    max-width: 5rem;
    height: 0.4rem;
    border-radius: 999px;
    background: rgba(244, 241, 232, 0.08);
    overflow: hidden;
    vertical-align: middle;
}

.use-bar .fill {
    height: 100%;
    width: calc(var(--use, 0) * 100%);
    background: var(--stadium-amber);
    border-radius: 999px;
    transition: width 0.35s ease;
}

.use-bar.over .fill { background: var(--stadium-red); }

@media (max-width: 560px) {
    .use-bar { max-width: none; }
}

/* =========================================================================
   Banco — produtos lado a lado (Renda Fixa + Empréstimo) no tema do estádio.
   ========================================================================= */
.bank-grid {
    display: grid;
    /* min(340px, 100%): em telas mais estreitas que 340px úteis, o mínimo passa
       a ser a largura disponível — sem estourar o viewport do celular. */
    grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
    gap: var(--stadium-gap);
    align-items: stretch; /* os dois painéis ficam com a mesma altura */
}

.bank-panel {
    padding: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

/* nota fixa no rodapé do painel: alinha o pé dos dois cartões mesmo com alturas iguais */
.bank-panel .wallet-foot {
    margin-top: auto;
}

/* KPIs do banco: rótulo em cima, valor embaixo — valor longo ($ 1.002.393,91)
   nunca colide com o rótulo da célula vizinha. */
.bank-kpis .kpi-cell {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.1rem;
}

.bank-kpis .kpi-cell strong {
    font-size: 1rem;
}

.bank-highlight {
    display: grid;
    gap: 0.3rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--stadium-line);
    border-left: 3px solid var(--stadium-muted);
    border-radius: var(--stadium-radius);
    background: rgba(244, 241, 232, 0.02);
}

.bank-highlight.is-yield {
    border-left-color: var(--stadium-green);
    background: var(--stadium-green-soft);
}

.bank-highlight.is-leverage {
    border-left-color: var(--stadium-amber);
}

.bank-proj {
    font-family: var(--stadium-mono);
    font-weight: 950;
    font-size: clamp(1.3rem, 2.4vw, 1.8rem);
    line-height: 1;
    color: #35df83;
}

.bank-proj-unit {
    font-size: 0.5em;
    color: var(--stadium-muted);
    margin-left: 0.2em;
}

.bank-kpis {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.45rem 0.9rem;
}

.bank-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.9rem;
}

.bank-action {
    display: grid;
    gap: 0.4rem;
}

.bank-action > label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--stadium-muted);
}

.bank-input {
    display: flex;
    gap: 0.4rem;
}

.bank-input input {
    flex: 1 1 auto;
    min-width: 0; /* não estoura o grid nem corta o botão */
}

.bank-go {
    border: none;
    border-radius: 7px;
    padding: 0.45rem 0.8rem;
    font-weight: 850;
    font-size: 0.82rem;
    white-space: nowrap;
    cursor: pointer;
}

.bank-go.go-in { background: var(--stadium-green); color: #031008; }
.bank-go.go-debt { background: #d32f2f; color: #fff; }
.bank-go.go-out {
    background: rgba(244, 241, 232, 0.05);
    color: var(--stadium-chalk);
    border: 1px solid var(--stadium-line-strong);
}

.bank-go:hover { filter: brightness(1.08); }
.bank-go:disabled { opacity: 0.55; cursor: not-allowed; }

.stadium-alert.is-ok {
    border-left-color: var(--stadium-green);
    background: var(--stadium-green-soft);
}

/* ===== Barra lateral recolhida (rail) — só desktop; o mobile usa o hambúrguer.
   Estado em <html class="fa-rail"> (App.razor aplica antes de pintar; persiste no localStorage).
   Esconde apenas rótulos textuais — o escudo do logo permanece centralizado e intacto. ===== */
@media (min-width: 641px) {
    html.fa-rail .sidebar {
        width: 68px;
    }

    html.fa-rail .brand-copy,
    html.fa-rail .nav-text,
    html.fa-rail .nav-account-name,
    html.fa-rail .nav-section-label span {
        display: none;
    }

    /* No rail o rótulo da seção vira um fio divisor: os grupos seguem perceptíveis. */
    html.fa-rail .nav-section-label {
        height: 1px;
        margin: 0.55rem 1.15rem 0.6rem;
        padding: 0;
        background: rgba(244, 241, 232, 0.12);
    }

    html.fa-rail .top-row {
        justify-content: center;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    html.fa-rail .navbar-brand {
        gap: 0;
    }

    html.fa-rail .nav-footer {
        padding-left: 0;
        padding-right: 0;
    }

    html.fa-rail .nav-list .nav-link,
    html.fa-rail .nav-account,
    html.fa-rail .nav-logout,
    html.fa-rail .nav-collapse {
        justify-content: center;
        gap: 0;
        padding-left: 0;
        padding-right: 0;
    }

    html.fa-rail .bi {
        margin-right: 0;
    }

    html.fa-rail .nav-collapse .bi {
        transform: rotate(180deg);
    }

    html.fa-rail .nav-item a.active {
        box-shadow: none;
    }
}

/* =========================================================================
   Páginas de conta (AuthLayout) — entrada limpa, tela cheia, tema estádio.
   Coluna de marca (decorativa) + cartão do formulário. Sem barra lateral.
   ========================================================================= */
.auth-shell {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    min-height: 100vh;
}

.auth-brand {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
    padding: clamp(2rem, 4vw, 3.4rem);
    border-right: 1px solid var(--stadium-line);
    background:
        radial-gradient(circle at 80% -10%, rgba(255, 194, 71, 0.16), transparent 26rem),
        radial-gradient(circle at 8% 92%, rgba(24, 165, 88, 0.2), transparent 24rem),
        linear-gradient(160deg, #06110c 0%, #07130e 48%, #040806 100%);
    background-color: #06110c;
}

/* Gramado/blueprint sutil atrás do conteúdo da marca */
.auth-brand-grid {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.5;
    background:
        linear-gradient(90deg, transparent calc(50% - 1px), rgba(244, 241, 232, 0.06) 50%, transparent calc(50% + 1px)),
        radial-gradient(ellipse at 50% 50%, transparent 0 22%, rgba(244, 241, 232, 0.05) 22.3% 22.8%, transparent 23.1%),
        repeating-linear-gradient(0deg, rgba(244, 241, 232, 0.035) 0 1px, transparent 1px 84px),
        repeating-linear-gradient(90deg, rgba(244, 241, 232, 0.035) 0 1px, transparent 1px 84px);
    mask-image: radial-gradient(ellipse at 40% 40%, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.15) 75%);
}

.auth-brand > * {
    position: relative;
    z-index: 1;
}

.auth-brand-top {
    display: inline-flex;
    align-items: center;
    gap: 1.1rem;
}

.auth-logo {
    display: inline-flex;
    width: 4.5rem;
    height: 4.5rem;
}

.auth-logo svg {
    width: 100%;
    height: 100%;
}

.auth-logo-copy {
    display: grid;
    line-height: 0.92;
    font-family: var(--stadium-condensed);
    text-transform: uppercase;
}

.auth-logo-copy span {
    color: var(--stadium-muted);
    font-size: 1.2rem;
    letter-spacing: 0.14em;
}

.auth-logo-copy strong {
    color: var(--stadium-chalk);
    font-size: 2.3rem;
    font-weight: 950;
}

.auth-kicker {
    margin: 0 0 1rem;
    color: var(--stadium-amber);
    font-family: var(--stadium-mono);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.auth-headline {
    margin: 0;
    max-width: 16ch;
    font-family: var(--stadium-condensed);
    font-size: clamp(2rem, 3.4vw, 3.1rem);
    font-weight: 950;
    line-height: 0.98;
    text-transform: uppercase;
    color: var(--stadium-chalk);
}

.auth-lede {
    margin: 1.1rem 0 1.6rem;
    max-width: 42ch;
    color: var(--stadium-muted);
    font-size: 1rem;
    line-height: 1.6;
}

.auth-points {
    display: grid;
    gap: 0.7rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.auth-points li {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: #cdd8d1;
    font-size: 0.92rem;
}

.auth-points li span {
    display: inline-grid;
    place-items: center;
    width: 1.7rem;
    height: 1.7rem;
    flex: 0 0 auto;
    border-radius: 7px;
    background: var(--stadium-green-soft);
    color: #36e08a;
    font-size: 0.9rem;
    font-weight: 800;
}

.auth-brand-foot {
    margin: 0;
    color: var(--stadium-muted);
    font-family: var(--stadium-mono);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.auth-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    padding: clamp(1.5rem, 4vw, 3rem) clamp(1.1rem, 4vw, 2.4rem);
}

.auth-card {
    width: 100%;
    max-width: 26rem;
}

.auth-stage-foot {
    margin: 0;
    color: var(--stadium-muted);
    font-size: 0.74rem;
    letter-spacing: 0.04em;
}

/* Tipografia de cabeçalho do formulário (substitui os <h1>/<h2> nus) */
.auth-eyebrow {
    color: var(--stadium-amber);
    font-family: var(--stadium-mono);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.auth-card h1,
.auth-title {
    margin: 0.45rem 0 0.3rem;
    font-family: var(--stadium-condensed);
    font-size: clamp(1.7rem, 4vw, 2.2rem);
    font-weight: 950;
    line-height: 1;
    text-transform: uppercase;
    color: var(--stadium-chalk);
}

.auth-sub {
    margin: 0 0 1.5rem;
    color: var(--stadium-muted);
    font-size: 0.94rem;
    line-height: 1.55;
}

/* Os campos reaproveitam .form-floating/.form-control/.btn-primary do tema.
   Espaçamento e divisores específicos da entrada: */
.auth-card .form-floating > label {
    color: var(--stadium-muted);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 1.4rem 0;
    color: var(--stadium-muted);
    font-family: var(--stadium-mono);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--stadium-line-strong);
}

.auth-foot-note {
    margin-top: 1.4rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--stadium-line);
    color: var(--stadium-muted);
    font-size: 0.9rem;
}

.auth-foot-note a {
    font-weight: 700;
}

/* Botão de provedor externo (Google etc.): herda do tema, com largura total */
.auth-card .external-providers button,
.auth-card .external-providers .btn {
    width: 100%;
}

/* Páginas de status (confirmação enviada, conta confirmada, bloqueio, erro):
   ícone temático + título + texto + ação de volta. */
.auth-status {
    text-align: center;
}

.auth-status .auth-status-icon {
    display: inline-grid;
    place-items: center;
    width: 3.6rem;
    height: 3.6rem;
    margin-bottom: 1rem;
    border-radius: 14px;
    font-size: 1.7rem;
    border: 1px solid var(--stadium-line-strong);
    background: rgba(244, 241, 232, 0.04);
}

.auth-status.is-ok .auth-status-icon {
    color: #36e08a;
    border-color: rgba(24, 165, 88, 0.4);
    background: var(--stadium-green-soft);
}

.auth-status.is-info .auth-status-icon {
    color: var(--stadium-amber);
    border-color: rgba(255, 194, 71, 0.4);
    background: var(--stadium-amber-soft);
}

.auth-status.is-warn .auth-status-icon {
    color: #ff6d69;
    border-color: rgba(229, 57, 53, 0.4);
    background: var(--stadium-red-soft);
}

.auth-status .auth-title {
    text-align: center;
}

.auth-status .auth-sub {
    text-align: center;
    margin-bottom: 1.6rem;
}

/* Empilha em telas estreitas: a marca vira uma faixa enxuta no topo */
@media (max-width: 880px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-brand {
        border-right: 0;
        border-bottom: 1px solid var(--stadium-line);
        padding: 1.6rem 1.4rem;
        gap: 1.1rem;
    }

    .auth-brand-mid {
        display: none;
    }

    .auth-brand-foot {
        display: none;
    }

    .auth-stage {
        justify-content: flex-start;
        padding-top: 2rem;
    }
}

/* =========================================================================
   Assinatura — planos FREE x PRO (página /assinatura, dentro do app shell).
   ========================================================================= */
.plan-page {
    display: grid;
    gap: 1.4rem;
    max-width: 980px;
    margin-inline: auto;
    padding-bottom: 2.5rem;
}

.plan-head h1 {
    margin: 0.1rem 0 0;
    font-family: var(--stadium-condensed);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 950;
    text-transform: uppercase;
    line-height: 1;
}

.plan-head p {
    margin: 0.5rem 0 0;
    max-width: 60ch;
    color: var(--stadium-muted);
}

.plan-current {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.8rem;
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--stadium-line-strong);
    border-radius: 999px;
    font-size: 0.82rem;
}

.plan-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.1rem;
    align-items: stretch;
}

.plan-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    padding: 1.5rem;
    border: 1px solid var(--stadium-line);
    border-radius: var(--stadium-radius);
    background:
        linear-gradient(180deg, rgba(244, 241, 232, 0.035), transparent 42%),
        var(--stadium-panel);
}

.plan-card.featured {
    border-color: rgba(255, 194, 71, 0.5);
    background:
        radial-gradient(circle at 90% -10%, rgba(255, 194, 71, 0.12), transparent 18rem),
        linear-gradient(180deg, rgba(255, 194, 71, 0.05), transparent 42%),
        var(--stadium-panel-strong);
    box-shadow: var(--stadium-shadow);
}

.plan-ribbon {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: var(--stadium-amber);
    color: #06100b;
    font-family: var(--stadium-mono);
    font-size: 0.64rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.plan-name {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-family: var(--stadium-condensed);
    font-size: 1.35rem;
    font-weight: 950;
    text-transform: uppercase;
}

.plan-badge {
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.plan-badge.free {
    color: var(--stadium-muted);
    background: rgba(143, 164, 154, 0.18);
}

.plan-badge.pro {
    color: #06100b;
    background: var(--stadium-amber);
}

.plan-price {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    font-family: var(--stadium-mono);
}

.plan-price strong {
    font-size: 1.9rem;
    font-weight: 950;
    color: var(--stadium-chalk);
}

.plan-price span {
    color: var(--stadium-muted);
    font-size: 0.84rem;
}

.plan-tagline {
    margin: 0;
    color: var(--stadium-muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

.plan-feat {
    display: grid;
    gap: 0.55rem;
    margin: 0.3rem 0 0;
    padding: 0;
    list-style: none;
}

.plan-feat li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.92rem;
    line-height: 1.4;
    color: #cdd8d1;
}

.plan-feat li::before {
    content: "✓";
    color: #36e08a;
    font-weight: 900;
    flex: 0 0 auto;
}

.plan-feat li.muted {
    color: var(--stadium-muted);
}

.plan-feat li.muted::before {
    content: "○";
    color: var(--stadium-muted);
}

.plan-card .plan-cta {
    margin-top: auto;
}

.plan-note {
    color: var(--stadium-muted);
    font-size: 0.78rem;
}

@media (max-width: 720px) {
    .plan-grid {
        grid-template-columns: 1fr;
    }
}

/* Campo desabilitado/readonly legível no tema escuro (Minha Conta usa
   form-control desabilitado para o nome de usuário — o default do Bootstrap
   é fundo claro com texto claro). */
.form-control:disabled,
.form-control[readonly] {
    background-color: rgba(244, 241, 232, 0.07);
    color: var(--stadium-muted);
    opacity: 1;
}

/* .rk-unit / .rk-num: mantidos porque o Perfil publico (/perfil) reusa estas
   classes na tabela de campanhas mensais. O restante do antigo bloco de Ranking
   foi removido - a pagina passou a usar CSS scoped (Ranking.razor.css). */
.rk-unit {
    color: var(--stadium-muted);
    font-size: 0.85em;
    font-weight: 600;
}

.rk-num {
    font-family: var(--stadium-mono);
    font-weight: 800;
    white-space: nowrap;
}

/* =========================================================================
   Perfil público — ficha de atleta (/perfil/{nickname}).
   Herói com escudo-monograma na cor do nível + KPIs; sparkline da temporada;
   campanhas mensais; atividade agregada (nunca posições/ordens).
   ========================================================================= */
.profile-page {
    display: grid;
    gap: var(--stadium-gap);
    max-width: 56rem;
    margin-inline: auto;
}

.profile-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.4rem;
    padding: 1.1rem 1.2rem;
}

.ph-id {
    display: flex;
    align-items: center;
    gap: 0.95rem;
    min-width: 0;
}

/* Escudo-monograma: anel na cor do nível (mesma paleta do tier-dot) */
.ph-shield {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    border-radius: 999px;
    border: 2px solid var(--stadium-line-strong);
    background:
        radial-gradient(circle at 30% 25%, rgba(244, 241, 232, 0.08), transparent 60%),
        rgba(1, 7, 4, 0.55);
    font-family: var(--stadium-condensed);
    font-size: 1.9rem;
    font-weight: 950;
    color: var(--stadium-chalk);
}

.ph-shield.nivel-sardinha { border-color: rgba(244, 241, 232, 0.55); }
.ph-shield.nivel-junior { border-color: var(--stadium-green); box-shadow: 0 0 14px rgba(24, 165, 88, 0.25); }
.ph-shield.nivel-senior { border-color: var(--stadium-amber); box-shadow: 0 0 14px rgba(255, 194, 71, 0.25); }
.ph-shield.nivel-tubarao { border-color: var(--stadium-red, #ff6d69); box-shadow: 0 0 14px rgba(229, 57, 53, 0.28); }

.ph-who {
    min-width: 0;
}

.profile-hero h1 {
    margin: 0.1rem 0 0.35rem;
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 950;
    line-height: 1;
    overflow-wrap: anywhere;
}

.ph-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

a.wl-chip {
    text-decoration: none;
}

a.wl-chip:hover {
    color: var(--stadium-amber);
}

.ph-since {
    margin: 0.4rem 0 0;
    color: var(--stadium-muted);
    font-family: var(--stadium-mono);
    font-size: 0.7rem;
}

.ph-kpis {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem 1.4rem;
}

.ph-kpi {
    display: grid;
    gap: 0.3rem;
    padding-left: 1.1rem;
    border-left: 1px solid rgba(255, 194, 71, 0.18);
}

.ph-equity {
    font-family: var(--stadium-mono);
    font-size: clamp(1.25rem, 2.6vw, 1.7rem);
    font-weight: 950;
    line-height: 1;
    white-space: nowrap;
}

.ph-equity .cur {
    margin-right: 0.18em;
    color: var(--stadium-muted);
    font-size: 0.62em;
}

.ph-score {
    font-family: var(--stadium-mono);
    font-size: clamp(1.1rem, 2.2vw, 1.45rem);
    font-weight: 950;
    line-height: 1;
    white-space: nowrap;
}

/* Gráfico da temporada */
.profile-chart {
    padding: 0.9rem;
}

.pc-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
}

.pc-range {
    color: var(--stadium-muted);
    font-family: var(--stadium-mono);
    font-size: 0.7rem;
}

.pf-spark {
    display: block;
    width: 100%;
    height: 7.2rem;
}

/* Campanhas + atividade lado a lado */
.profile-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: var(--stadium-gap);
    align-items: stretch;
}

.profile-campaigns,
.profile-stats,
.profile-badges,
.profile-prizes {
    padding: 0.9rem;
}

.pf-table {
    font-size: 0.82rem;
}

.pf-prize {
    color: var(--stadium-amber);
    font-weight: 900;
    white-space: nowrap;
}

.pf-none {
    color: var(--stadium-muted);
}

/* Pill de status do prêmio (pendente → aprovado → pago) */
.pf-status {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0.1rem 0.42rem;
    border-radius: 999px;
    font-size: 0.6rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.pf-status.is-pago {
    color: #95ffc2;
    background: var(--stadium-green-soft);
    border: 1px solid rgba(24, 165, 88, 0.45);
}

.pf-status.is-aprovado {
    color: var(--stadium-amber);
    background: var(--stadium-amber-soft);
    border: 1px solid rgba(255, 194, 71, 0.4);
}

.pf-status.is-pendente {
    color: var(--stadium-muted);
    background: rgba(143, 164, 154, 0.14);
    border: 1px solid rgba(143, 164, 154, 0.28);
}

.pf-empty {
    margin: 0;
    color: var(--stadium-muted);
    font-size: 0.8rem;
}

.pf-privacy {
    margin: 0.7rem 0 0;
    color: var(--stadium-muted);
    font-size: 0.7rem;
}

@media (max-width: 860px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================================
   /admin — cockpit do administrador: abas, cartões de saúde com LEDs e
   barras de medida, interruptores de comando rápido e réguas de parâmetro.
   ========================================================================= */
.adm-wrap {
    max-width: 1240px;
}

.adm-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.7rem;
}

.adm-head h1 {
    margin: 0;
}

.adm-chip {
    padding: 0.16rem 0.6rem;
    border-radius: 999px;
    font-family: var(--stadium-condensed);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    white-space: nowrap;
}

.adm-chip.ok {
    color: #95ffc2;
    background: var(--stadium-green-soft);
    border: 1px solid rgba(24, 165, 88, 0.45);
}

.adm-chip.bad {
    color: #ffb3b1;
    background: var(--stadium-red-soft);
    border: 1px solid rgba(229, 57, 53, 0.5);
}

.adm-chip.wait {
    color: var(--stadium-muted);
    background: rgba(143, 164, 154, 0.12);
    border: 1px solid rgba(143, 164, 154, 0.28);
}

.adm-toast {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(91, 226, 176, 0.4);
    border-radius: var(--stadium-radius);
    background: rgba(24, 165, 88, 0.12);
    font-size: 0.82rem;
}

.adm-toast.is-error {
    border-color: rgba(229, 57, 53, 0.5);
    background: var(--stadium-red-soft);
}

.adm-toast button {
    margin-left: auto;
    padding: 0 0.2rem;
    border: 0;
    background: none;
    color: var(--stadium-muted);
    font-size: 0.95rem;
    line-height: 1;
}

.adm-toast button:hover {
    color: var(--stadium-chalk);
}

/* Barra de abas (rolável no dedo, sem scrollbar visível) */
.adm-tabs {
    display: flex;
    gap: 0.3rem;
    margin-bottom: var(--stadium-gap);
    padding: 0.28rem;
    border: 1px solid var(--stadium-line);
    border-radius: 10px;
    background: rgba(1, 7, 4, 0.5);
    overflow-x: auto;
    scrollbar-width: none;
}

.adm-tabs::-webkit-scrollbar {
    display: none;
}

.adm-tab {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.42rem 0.8rem;
    border: 1px solid transparent;
    border-radius: 8px;
    background: none;
    color: var(--stadium-muted);
    font-family: var(--stadium-condensed);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.adm-tab:hover {
    color: var(--stadium-chalk);
}

.adm-tab.active {
    color: #04130a;
    background: linear-gradient(180deg, #28d275, var(--stadium-green));
    border-color: rgba(84, 245, 153, 0.8);
}

.adm-tab-chip {
    min-width: 1.15rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: var(--stadium-amber);
    color: #201200;
    font-family: var(--stadium-mono);
    font-size: 0.66rem;
    font-weight: 900;
    text-align: center;
}

.adm-tab-chip.bad {
    background: var(--stadium-red);
    color: #fff;
}

.adm-sec {
    margin: 1rem 0 0.5rem;
    font-size: 1rem;
}

.adm-sec-sub {
    margin-left: 0.4rem;
    color: var(--stadium-muted);
    font-family: var(--stadium-ui);
    font-size: 0.68rem;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
}

.adm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
    gap: var(--stadium-gap);
    align-items: stretch;
}

.adm-card {
    padding: var(--stadium-pad);
}

.adm-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.55rem;
}

.adm-eyebrow {
    color: var(--stadium-muted);
    font-family: var(--stadium-condensed);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.adm-ghost {
    margin-left: auto;
    padding: 0.05rem 0.5rem;
    border: 1px solid var(--stadium-line-strong);
    border-radius: 6px;
    background: rgba(244, 241, 232, 0.03);
    color: var(--stadium-muted);
    font-size: 0.74rem;
    line-height: 1.4;
}

.adm-ghost:hover:not(:disabled) {
    color: var(--stadium-amber);
    border-color: rgba(255, 194, 71, 0.55);
}

.adm-big {
    font-family: var(--stadium-mono);
    font-size: 1.3rem;
    font-weight: 900;
    line-height: 1.15;
    white-space: nowrap;
}

.adm-big-sub {
    color: var(--stadium-muted);
    font-size: 0.72rem;
    font-weight: 600;
}

.adm-kv {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0.18rem 0;
    color: var(--stadium-muted);
    font-size: 0.78rem;
}

.adm-kv strong {
    color: var(--stadium-chalk);
    font-family: var(--stadium-mono);
    font-size: 0.78rem;
    text-align: right;
}

.adm-kv em,
.adm-dim {
    color: var(--stadium-muted);
    font-style: normal;
}

.adm-note {
    margin: 0.5rem 0 0;
    color: var(--stadium-muted);
    font-size: 0.7rem;
}

.adm-wrap .text-pos {
    color: #4cd98a;
}

.adm-wrap .text-neg {
    color: #ff7a77;
}

/* LEDs das checagens de invariante */
.adm-led-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0.24rem 0;
    font-size: 0.78rem;
}

.adm-led {
    flex: 0 0 auto;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
}

.adm-led.ok {
    background: var(--stadium-green);
    box-shadow: 0 0 8px rgba(24, 165, 88, 0.8);
}

.adm-led.bad {
    background: var(--stadium-red);
    box-shadow: 0 0 8px rgba(229, 57, 53, 0.85);
}

.adm-led.warn {
    background: var(--stadium-amber);
    box-shadow: 0 0 8px rgba(255, 194, 71, 0.8);
}

.adm-led-val {
    margin-left: auto;
    color: var(--stadium-muted);
    font-family: var(--stadium-mono);
    font-size: 0.7rem;
    white-space: nowrap;
}

/* Barra de medida simples (medidor com % preenchida) */
.adm-meter {
    height: 0.55rem;
    margin: 0.35rem 0 0.15rem;
    border-radius: 999px;
    background: rgba(244, 241, 232, 0.08);
    overflow: hidden;
}

.adm-meter-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #28d275, var(--stadium-green));
    transition: width 0.35s ease;
}

.adm-meter-fill.warn {
    background: linear-gradient(90deg, #ffd57a, var(--stadium-amber));
}

.adm-meter-fill.bad {
    background: linear-gradient(90deg, #ff7a77, var(--stadium-red));
}

.adm-meter-cap {
    display: flex;
    justify-content: space-between;
    gap: 0.6rem;
    color: var(--stadium-muted);
    font-family: var(--stadium-mono);
    font-size: 0.64rem;
}

/* Barra empilhada (composição: consumo de stops, posturas dos bots) */
.adm-stack {
    display: flex;
    height: 0.6rem;
    border-radius: 999px;
    background: rgba(244, 241, 232, 0.08);
    overflow: hidden;
}

.adm-seg {
    height: 100%;
}

.sg-green { background: var(--stadium-green); }
.sg-red { background: var(--stadium-red); }
.sg-amber { background: var(--stadium-amber); }
.sg-blue { background: var(--stadium-blueprint); }
.sg-mut { background: rgba(143, 164, 154, 0.55); }

.adm-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 0.8rem;
    margin-top: 0.32rem;
    color: var(--stadium-muted);
    font-size: 0.68rem;
}

.adm-dot {
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    margin-right: 0.28rem;
    border-radius: 2px;
}

/* Mini-barra de magnitude dentro de tabelas (P&L por bot, notional por ativo) */
.adm-bar {
    position: relative;
    height: 0.45rem;
    min-width: 70px;
    border-radius: 999px;
    background: rgba(244, 241, 232, 0.07);
    overflow: hidden;
}

.adm-bar i {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    display: block;
    border-radius: 999px;
}

.adm-bar i.pos { background: var(--stadium-green); }
.adm-bar i.neg { background: var(--stadium-red); }

.adm-more {
    display: block;
    margin-top: 0.5rem;
    padding: 0;
    border: 0;
    background: none;
    color: var(--stadium-blueprint);
    font-size: 0.72rem;
}

.adm-more:hover {
    color: var(--stadium-amber);
}

/* Pulso dos bots: KPIs lado a lado */
.adm-pulse {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.2rem 1.6rem;
}

.adm-pulse .adm-kv {
    justify-content: flex-start;
    gap: 0.45rem;
}

/* Interruptores de comando rápido */
.adm-switches {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 0.5rem;
}

.adm-switch {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin: 0;
    padding: 0.55rem 0.65rem;
    border: 1px solid var(--stadium-line);
    border-radius: 8px;
    background: rgba(1, 7, 4, 0.42);
    cursor: pointer;
}

.adm-switch:hover {
    border-color: rgba(255, 194, 71, 0.45);
}

.adm-switch.on {
    border-color: rgba(84, 245, 153, 0.4);
    background: rgba(24, 165, 88, 0.07);
}

.adm-switch .form-check-input {
    margin-top: 0.15rem;
}

.adm-switch-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
}

.adm-switch-state {
    color: var(--stadium-muted);
    font-size: 0.66rem;
    font-style: normal;
    font-weight: 600;
    text-transform: uppercase;
}

.adm-switch.on .adm-switch-state {
    color: #95ffc2;
}

.adm-switch-help {
    display: block;
    color: var(--stadium-muted);
    font-size: 0.68rem;
}

/* Perfis de operação dos bots */
.adm-presets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
    gap: 0.5rem;
}

.adm-preset {
    padding: 0.55rem 0.65rem;
    border: 1px solid var(--stadium-line);
    border-radius: 8px;
    background: rgba(1, 7, 4, 0.42);
    color: var(--stadium-chalk);
    text-align: left;
}

.adm-preset:hover:not(:disabled) {
    border-color: rgba(255, 194, 71, 0.55);
}

.adm-preset.active {
    border-color: rgba(84, 245, 153, 0.75);
    background: var(--stadium-green-soft);
}

.adm-preset-name {
    display: block;
    font-family: var(--stadium-condensed);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.adm-preset-live {
    margin-left: 0.35rem;
    color: #95ffc2;
    font-size: 0.62rem;
    letter-spacing: 0.06em;
}

.adm-preset-desc {
    display: block;
    margin-top: 0.15rem;
    color: var(--stadium-muted);
    font-size: 0.68rem;
}

.adm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Parâmetros: barra de ferramentas + linha de edição com régua */
.adm-param-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}

.adm-param {
    padding: 0.6rem 0.75rem;
    border-top: 1px solid var(--stadium-line);
}

.adm-param-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
}

.adm-param-info {
    flex: 1 1 360px;
    min-width: 260px;
}

.adm-param-ctrl {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.adm-param-ctrl .adm-num {
    width: 120px;
}

input[type="range"].adm-range {
    width: 160px;
    accent-color: var(--stadium-green);
}

/* Zona de perigo (liquidação da temporada) */
.adm-danger {
    border-color: rgba(229, 57, 53, 0.4);
    background:
        linear-gradient(180deg, rgba(229, 57, 53, 0.08), transparent 55%),
        var(--stadium-panel);
}

.adm-danger-title {
    color: #ff8a87;
}

/* Pill extra para prêmio negado (as demais vêm do perfil público) */
.pf-status.is-negado {
    color: #ffb3b1;
    background: var(--stadium-red-soft);
    border: 1px solid rgba(229, 57, 53, 0.45);
}

/* =========================================================================
   Selo PRO público — GLOBAL de propósito: aparece ao lado do apelido em
   Ranking, Perfil e Ligas (páginas com CSS scoped; classe global atravessa).
   Indica acesso PRO de assinante (plano pago OU passe de indicação vigente;
   admin não conta). NUNCA usar no book/fita — o mercado é anônimo.
   ========================================================================= */
.pro-chip {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.02rem 0.34rem;
    border-radius: 999px;
    font-family: var(--stadium-mono);
    font-size: 0.56rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    vertical-align: middle;
    color: #95ffc2;
    background: var(--stadium-green-soft);
    border: 1px solid rgba(53, 223, 131, 0.25);
}

/* Banner de convite no cadastro (indique e ganhe): "Convite de X". */
.auth-ref-banner {
    margin: 0 0 1rem;
    padding: 0.55rem 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #95ffc2;
    background: var(--stadium-green-soft);
    border: 1px solid rgba(53, 223, 131, 0.25);
}
.auth-ref-banner strong { color: var(--stadium-chalk); }

/* =========================================================================
   Mobile (≤640px) — correções da auditoria de layout em celular (jul/2026).
   Objetivos: zero scroll horizontal da página, alvo de toque confortável e
   fonte ≥16px em campos de formulário (evita o zoom automático do iOS).
   Fica no FIM do arquivo de propósito: em empate de especificidade, a última
   regra vence os estilos de tema declarados acima.
   ========================================================================= */
@media (max-width: 640.98px) {
    /* O iOS dá zoom na página inteira quando o campo focado tem fonte <16px.
       !important de propósito: é regra de plataforma (vale até sobre estilos
       inline por página, como os do Estudo), não escolha de tema. */
    select,
    textarea,
    input[type="text"],
    input[type="number"],
    input[type="email"],
    input[type="password"],
    input[type="search"],
    input[type="date"] {
        font-size: 16px !important;
    }

    /* Cabeçalho do book (melhor compra · spread · melhor venda): quebra linha
       em vez de sobrepor os textos. */
    .book-spread {
        flex-wrap: wrap;
        row-gap: 0.3rem;
    }

    /* Tabelas do book e do T&T: se não couberem, rolam DENTRO do painel —
       a página nunca ganha scrollbar horizontal. */
    .ladder-scroll,
    .tape-scroll {
        overflow-x: auto;
    }

    /* Legenda OHLC do gráfico: quebra linha, não invade o eixo de preço e
       ganha um véu para não se misturar com as velas. */
    .chart-legend {
        right: 3.4rem;
        flex-wrap: wrap;
        column-gap: 0.55rem;
        row-gap: 0.1rem;
        padding: 0.12rem 0.3rem;
        background: rgba(5, 11, 8, 0.72);
        border-radius: 5px;
        white-space: normal;
    }

    /* Preços clicáveis do book viram alvo de toque de verdade. */
    .price-pill {
        min-width: 4rem;
        padding: 0.5rem 0.55rem;
        font-size: 0.88rem;
    }

    /* Botões rápidos (ticket e Banco) e abas do book/gráfico. */
    .qty-quick button,
    .book-tabs button {
        min-height: 2.6rem;
    }

    /* Modo Rápido: chips de quantidade e botão "Zerar" viram alvo de toque de verdade (≥42px). */
    .qt-chips button,
    .qt-pos button {
        min-height: 2.6rem;
    }

    /* Steppers do ticket: − / + e campo com altura de dedo. */
    .stepper button {
        min-width: 2.75rem;
    }

    .stepper input {
        min-height: 2.6rem;
    }

    /* Cotações: a régua de filtros quebra linha (não empurra a página). */
    .tkr-tabs {
        flex-wrap: wrap;
    }

    /* Grupos de botões do Bootstrap (filtros do Extrato) viram chips com
       quebra de linha — btn-group não quebra sozinho. */
    .btn-group-sm[role="group"] {
        flex-wrap: wrap;
        gap: 0.3rem;
    }

    .btn-group-sm[role="group"] > .btn {
        margin-left: 0;
        border-radius: 0.375rem;
    }

    /* Patrimônio da Carteira: cabe inteiro ($ 9.999.999,99) sem elipse. */
    .wallet-equity {
        font-size: clamp(1.55rem, 8vw, 1.9rem);
    }

    /* Mini-carteira do desk: KPIs empilhados — valores longos não elipsam. */
    .carteira-metrics {
        grid-template-columns: minmax(0, 1fr);
    }

    /* Ranking: tabela mais densa; nomes podem quebrar linha, números nunca.
       Se ainda assim não couber, .rank-table-wrap rola dentro do painel. */
    .rank-table {
        font-size: 0.78rem;
    }

    .rank-table th,
    .rank-table td {
        padding: 0.45rem 0.3rem;
    }

    .rank-table th {
        font-size: 0.62rem;
        letter-spacing: 0.04em;
    }

    .rank-table th:first-child,
    .rank-table td:first-child {
        padding-left: 0.5rem;
    }

    .rank-table th:last-child,
    .rank-table td:last-child {
        padding-right: 0.5rem;
    }

    .rk-col-pos {
        width: 2.2rem;
    }

    .rk-pos {
        min-width: 1.45rem;
        height: 1.45rem;
        font-size: 0.7rem;
    }

    .rank-table .rk-num {
        font-size: 0.74rem;
    }

    .rk-board-head,
    .rank-mine,
    .rank-legend {
        padding-left: 0.6rem;
        padding-right: 0.6rem;
    }

    /* Cards de divisão: cabem 2 por linha com conteúdo enxuto. */
    .rank-div {
        padding: 0.55rem 0.6rem;
    }

    .rd-meta {
        flex-wrap: wrap;
    }

    .rd-range {
        white-space: normal; /* "$ 250 mil a $ 500 mil" quebra em vez de vazar do card */
    }

    /* Chips de status descem para baixo do nome: a coluna Jogador encolhe e a
       tabela inteira cabe em 375px sem rolagem interna. */
    .rank-table .rk-out,
    .rank-table .rk-champ-chip {
        display: block;
        width: max-content;
        margin: 0.2rem 0 0;
        font-size: 0.56rem;
    }

    /* Perfil: herói empilha (escudo+identidade em cima, KPIs embaixo em linha
       própria, sem divisores verticais). */
    .profile-hero {
        padding: 0.9rem 0.8rem;
    }

    .ph-shield {
        width: 3.2rem;
        height: 3.2rem;
        font-size: 1.5rem;
    }

    .ph-kpis {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.6rem;
        padding-top: 0.8rem;
        border-top: 1px solid var(--stadium-line);
    }

    .ph-kpi {
        padding-left: 0;
        border-left: none;
        grid-template-columns: auto 1fr;
        align-items: baseline;
        justify-content: space-between;
    }

    .ph-kpi .eyebrow {
        align-self: center;
    }

    .ph-kpi strong {
        justify-self: end;
    }

    .pf-spark {
        height: 5.6rem;
    }

    /* Admin: abas com alvo de toque, régua de parâmetro em linha própria e
       botão "Atualizar tudo" sem disputar espaço com o título. */
    .adm-tab {
        min-height: 2.5rem;
        padding: 0.5rem 0.75rem;
    }

    .adm-head .btn {
        margin-left: 0 !important;
    }

    .adm-param-ctrl {
        width: 100%;
    }

    input[type="range"].adm-range {
        flex: 1 1 100%;
        width: 100%;
    }

    .adm-pulse {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.1rem;
    }

    .adm-pulse .adm-kv {
        justify-content: space-between;
    }
}
