: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-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;
}

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: 1rem;
    align-items: start;
}

.asset-rail,
.book-stage,
.order-ticket,
.carteira-panel,
.destaque-wrap,
.open-orders {
    padding: 1rem;
}

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

.panel-heading h2 {
    margin: 0.1rem 0 0;
    font-size: 1.25rem;
    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: 6.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.58rem 0.68rem;
    border: 1px solid rgba(244, 241, 232, 0.08);
    border-radius: 7px;
    background: rgba(244, 241, 232, 0.03);
}

.book-metrics span {
    display: block;
    color: var(--stadium-muted);
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
}

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

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

.negative {
    color: #ff6d69 !important;
}

.order-book-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.85rem;
}

.order-book-grid section {
    overflow: hidden;
    border: 1px solid rgba(244, 241, 232, 0.07);
    border-radius: 8px;
    background: rgba(1, 7, 4, 0.35);
}

.ladder-title {
    padding: 0.58rem 0.72rem;
    border-bottom: 1px solid rgba(244, 241, 232, 0.07);
    font-family: var(--stadium-condensed);
    font-size: 1.1rem;
    font-weight: 950;
    text-transform: uppercase;
}

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

.ladder-table td,
.ladder-table th {
    padding: 0.48rem 0.62rem;
}

.depth-cell {
    position: relative;
    min-width: 5rem;
    isolation: isolate;
}

.depth-cell span:not(.depth-bar) {
    position: relative;
    z-index: 2;
}

.depth-bar {
    position: absolute;
    top: 0.28rem;
    right: 0.32rem;
    bottom: 0.28rem;
    z-index: 1;
    border-radius: 4px;
    opacity: 0.62;
}

.depth-bar.bid {
    background: linear-gradient(90deg, transparent, rgba(24, 165, 88, 0.52));
}

.depth-bar.ask {
    right: auto;
    left: 0.32rem;
    background: linear-gradient(90deg, rgba(229, 57, 53, 0.52), transparent);
}

.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.25rem 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.75rem;
    font-family: var(--stadium-mono);
    font-size: 1.08rem;
    font-weight: 850;
}

.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);
}

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

.home-desk {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
    gap: 1.5rem;
    align-items: center;
    min-height: 24rem;
    overflow: hidden;
    padding: clamp(1.25rem, 4vw, 3rem);
    position: relative;
}

.home-desk::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 20%, rgba(255, 194, 71, 0.18), transparent 16rem),
        linear-gradient(120deg, rgba(24, 165, 88, 0.18), transparent 56%);
    pointer-events: none;
}

.home-copy,
.home-board {
    position: relative;
    z-index: 1;
}

.home-copy h1 {
    margin: 0.12rem 0 0.75rem;
    font-size: clamp(3rem, 7vw, 6.8rem);
    font-weight: 950;
    line-height: 0.82;
}

.home-copy p {
    max-width: 43rem;
    margin-bottom: 1.35rem;
    color: var(--stadium-muted);
    font-size: 1.08rem;
}

.home-board {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid rgba(255, 194, 71, 0.18);
    border-radius: 8px;
    background: rgba(1, 7, 4, 0.62);
}

.board-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 0.85rem;
    align-items: center;
    padding: 0.72rem 0.78rem;
    border: 1px solid rgba(244, 241, 232, 0.08);
    border-radius: 7px;
    background: rgba(244, 241, 232, 0.035);
    font-family: var(--stadium-mono);
}

.board-row span {
    color: var(--stadium-chalk);
    font-weight: 900;
}

.board-row strong {
    font-weight: 950;
}

.board-row em {
    color: var(--stadium-muted);
    font-size: 0.8rem;
    font-style: normal;
}

.home-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.action-tile {
    display: grid;
    gap: 0.28rem;
    padding: 1rem;
    color: var(--stadium-chalk);
    text-decoration: none;
}

.action-tile:hover {
    color: var(--stadium-chalk);
    border-color: rgba(24, 165, 88, 0.34);
}

.action-tile span {
    color: var(--stadium-muted);
    font-family: var(--stadium-mono);
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.action-tile strong {
    font-family: var(--stadium-condensed);
    font-size: 1.45rem;
    font-weight: 950;
    text-transform: uppercase;
}

.action-tile small {
    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;
    }
}

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

    .scoreboard {
        justify-items: start;
    }

    .ticker-strip,
    .desk-grid,
    .order-book-grid,
    .book-metrics {
        grid-template-columns: 1fr;
    }

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

    .home-desk,
    .home-actions {
        grid-template-columns: 1fr;
    }
}

.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;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.1rem;
}

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

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

.carteira-positions {
    max-height: 16rem;
    overflow: auto;
}

.chart-placeholder {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(244, 241, 232, 0.08);
}

.chart-placeholder .book-tabs {
    margin-bottom: 0.6rem;
}

.chart-placeholder .book-tabs button {
    min-width: 4.6rem;
    opacity: 0.7;
}

.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 {
        height: calc(100vh - 5.5rem);
        grid-template-rows: auto minmax(0, 1fr) auto;
        gap: 0.7rem;
        padding-bottom: 0;
    }

    .desk-grid {
        height: 100%;
        min-height: 0;
        align-items: stretch;
        gap: 0.7rem;
    }

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

    .book-stage {
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .book-stage .order-book-grid {
        flex: 1 1 auto;
        min-height: 0;
        overflow: auto;
    }

    .order-ticket {
        overflow: auto;
    }

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

    .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: auto;
    }

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

    /* Chart placeholder não rouba altura do book nesta fase */
    .book-stage .chart-placeholder {
        flex: 0 0 auto;
    }
}

/* Correção de overflow horizontal no dashboard (tracks e itens podem encolher; conteúdo rola interno) */
@media (min-width: 1181px) {
    .desk-grid {
        grid-template-columns: minmax(0, 1.9fr) minmax(0, 0.95fr) minmax(0, 0.92fr);
    }

    .book-stage,
    .order-ticket,
    .desk-rightcol,
    .topbar-pregao,
    .book-stage .order-book-grid,
    .order-book-grid section,
    .carteira-panel .carteira-positions,
    .carteira-panel .book-metrics,
    .open-orders .orders-scroll {
        min-width: 0;
    }

    .asset-tag-name {
        max-width: 22rem;
        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%;
    font-size: 0.8rem;
}

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

.open-orders .orders-scroll th:first-child,
.open-orders .orders-scroll 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;
}

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

/* Títulos COMPRA/VENDA do book centralizados */
.ladder-title {
    text-align: center;
}
