html, body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

/* Scrollbar - dark theme friendly */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #30363D;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #484F58;
}

/* ═══════════ Casino / poker felt ambience (dark theme) ═══════════ */
/* Felt vignette behind the whole app — stronger for the lobby feel */
.mud-layout {
    background:
        radial-gradient(120% 90% at 50% -20%, rgba(20, 83, 58, 0.55) 0%, rgba(11, 53, 36, 0.35) 45%, transparent 75%),
        radial-gradient(120% 100% at 50% 115%, rgba(6, 35, 23, 0.5) 0%, transparent 55%);
}

/* App bar: dark green with a thin gold underline (poker rail) */
.workspace-appbar {
    background: linear-gradient(180deg, #0E2C20 0%, #0B1F17 100%) !important;
    border-bottom: 1px solid rgba(255, 215, 64, 0.35);
}

/* ═══════════ Lobby (direção A — cara de jogo) ═══════════ */
.lobby {
    max-width: 1020px;
    margin: 0 auto;
    padding-bottom: 24px;
}

/* ── Hero: saldo dourado + CTA ── */
.lobby-hero {
    text-align: center;
    padding: 22px 16px 6px;
}
.lobby-hello {
    font-size: 13px;
    color: #9DB8AA;
}
.lobby-hello b { color: #E6EDF3; }
.lobby-chips {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 8px 0 4px;
    color: #E6EDF3;
}
.lobby-chips svg {
    width: 24px;
    height: 24px;
    background: none;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}
.lobby-balance-label {
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-size: 11px;
    color: #9DB8AA;
    margin-top: 2px;
}
.lobby-balance {
    font-size: 44px;
    font-weight: 800;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
    background: linear-gradient(180deg, #FFF6D8, #F5C542 70%, #D19A25);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 3px 18px rgba(245, 197, 66, 0.22);
    /* Brilho dourado suave em volta dos dígitos (funciona com background-clip:text) */
    filter: drop-shadow(0 0 16px rgba(245, 197, 66, 0.3));
}
.lobby-cta {
    display: inline-block;
    margin-top: 14px;
    padding: 12px 34px;
    background: linear-gradient(180deg, #FFD966, #E9A93B 55%, #C9861B);
    color: #33230A;
    font-family: inherit;
    font-weight: 800;
    font-size: 15px;
    letter-spacing: 0.03em;
    border-radius: 999px;
    border: 0;
    cursor: pointer;
    /* Glow dourado: o CTA é a peça de maior hierarquia do lobby */
    box-shadow: 0 6px 0 #7A5210, 0 14px 28px rgba(0, 0, 0, 0.45), 0 0 28px rgba(245, 197, 66, 0.35);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.lobby-cta:hover {
    transform: translateY(2px);
    box-shadow: 0 4px 0 #7A5210, 0 10px 22px rgba(0, 0, 0, 0.45), 0 0 36px rgba(245, 197, 66, 0.5);
}
.lobby-cta:focus-visible { outline: 3px solid #FFF; outline-offset: 3px; }

/* ── Tiles: o menu é a tela ── */
.lobby-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
    padding: 26px 16px 4px;
}
/* Card escuro uniforme com ícone verde-neon (padrão de referência do lobby).
   As classes tile-* seguem existindo para a section-bar; aqui só definem nada —
   o card escuro tem prioridade pelo seletor composto abaixo. */
.lobby-tile {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 116px;
    border-radius: 20px;
    padding: 18px 10px 14px;
    text-align: center;
    cursor: pointer;
    color: #E6EDF3;
    font-family: inherit;
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 10px 20px rgba(0, 0, 0, 0.35);
    transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}
.lobby-tile.tile-green, .lobby-tile.tile-blue, .lobby-tile.tile-purple,
.lobby-tile.tile-orange, .lobby-tile.tile-teal, .lobby-tile.tile-slate,
.lobby-tile.tile-gold, .lobby-tile {
    background: linear-gradient(165deg, #181D1B 0%, #0B0F0D 80%);
}
.lobby-tile::after {
    content: "";
    position: absolute;
    inset: 0 0 62% 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent);
    pointer-events: none;
}
.lobby-tile:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: rgba(46, 230, 168, 0.45);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 16px 30px rgba(0, 0, 0, 0.5),
                0 0 22px rgba(46, 230, 168, 0.18);
}
.lobby-tile:active { transform: translateY(-1px) scale(0.98); }
.lobby-tile:focus-visible { outline: 3px solid #FFF; outline-offset: 2px; }
.lobby-tile b {
    display: block;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #E6EDF3;
}
.lobby-tile small { font-size: 10.5px; color: #9DB8AA; }
.lobby-tile-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 0;
}
.lobby-tile-icon {
    font-size: 34px !important;
    width: 34px;
    height: 34px;
    margin-bottom: 8px;
    color: #2EE6A8;
    filter: drop-shadow(0 0 10px rgba(46, 230, 168, 0.55));
}

/* Linha larga (ex.: Chaves PIX): ícone à esquerda, texto alinhado, seta à direita */
.lobby-tile-wide {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: flex-start;
    gap: 14px;
    min-height: 64px;
    padding: 14px 18px;
    text-align: left;
}
.lobby-tile-wide .lobby-tile-icon { margin-bottom: 0; }
.lobby-tile-wide .lobby-tile-text { align-items: flex-start; }
.lobby-tile-wide::after {
    /* substitui o brilho superior pela seta de navegação */
    content: "\203A";
    position: static;
    inset: auto;
    background: none;
    margin-left: auto;
    font-size: 26px;
    line-height: 1;
    color: #2EE6A8;
}
.lobby-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #E4574F;
    color: #fff;
    font-size: 10.5px;
    font-weight: 800;
    border-radius: 999px;
    padding: 2px 7px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4), 0 0 12px rgba(228, 87, 79, 0.55);
    z-index: 1;
}

/* Gradientes dos tiles */
.tile-green  { background: linear-gradient(160deg, #2FA463, #137A42); }
.tile-blue   { background: linear-gradient(160deg, #3D7BD9, #1F4FA3); }
.tile-purple { background: linear-gradient(160deg, #9A5BD9, #6A2FA3); }
.tile-orange { background: linear-gradient(160deg, #E8863C, #BF5E14); }
.tile-teal   { background: linear-gradient(160deg, #20B2A0, #0E7F72); }
.tile-slate  { background: linear-gradient(160deg, #5C6B77, #3A4650); }
.tile-gold   { background: linear-gradient(160deg, #E9A93B, #C9861B); }

/* ── Stats rápidos sob os tiles ── */
.lobby-stats {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 22px 16px 0;
}
.lobby-stat {
    flex: 1;
    min-width: 170px;
    max-width: 300px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(3, 26, 16, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 12px 18px;
}
.lobby-stat .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.lobby-stat b { font-size: 18px; font-variant-numeric: tabular-nums; }
.lobby-stat span { font-size: 12px; color: #9DB8AA; display: block; }

/* ═══════════ Padrão único de card (todos os perfis) ═══════════
   Anatomia (como o card de Bots): título grande + subtítulo em teal +
   destaque à direita; linhas de detalhe pequenas com rótulo; ações no rodapé.
   Todos os sistemas de card (link-card, club-card, mobile-cards,
   mud-table-small, caixa-card) consomem os mesmos tokens abaixo. */
:root {
    --card-radius: 16px;
    --card-border: 1px solid rgba(255, 255, 255, 0.08);
    --card-bg: linear-gradient(160deg, rgba(255, 255, 255, 0.045) 0%, rgba(3, 26, 16, 0.45) 70%);
    --card-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    --card-title: #E6EDF3;
    --card-accent: #00BFA6;
    --card-muted: #9DB8AA;
    --card-label: #6E8078;
}

/* ═══════════ m-card: card de entidade no mobile (anatomia do card de Bots) ═══════════
   Uso: a tabela desktop fica dentro de .m-desktop; a lista mobile em .m-cards.
   Anatomia: head (avatar + título + subtítulo teal + badge à direita),
   rows (ícone + rótulo + valor em destaque), actions no rodapé. */
.m-cards { display: none; }

@media (max-width: 700px) {
    .m-desktop { display: none !important; }
    .m-cards { display: flex; flex-direction: column; gap: 12px; }
}

.m-card {
    border-radius: var(--card-radius);
    border: var(--card-border);
    background: var(--card-bg);
    box-shadow: var(--card-shadow);
    padding: 14px 16px 12px;
}
.m-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
}
.m-card-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #F5C542, #C98A1B);
    color: #3A2A05;
    font-weight: 800;
    font-size: 16px;
    flex-shrink: 0;
}
.m-card-avatar .mud-icon-root { color: #3A2A05; font-size: 22px; }
.m-card-id { flex: 1; min-width: 0; }
.m-card-title {
    display: block;
    font-size: 16px;
    font-weight: 800;
    color: var(--card-title);
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.m-card-sub {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--card-accent);
    margin-top: 2px;
}
.m-card-badge { flex-shrink: 0; align-self: flex-start; }
.m-card-rows {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.m-card-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--card-muted);
    min-width: 0;
}
.m-card-row .mud-icon-root {
    font-size: 17px;
    color: var(--card-label);
    flex-shrink: 0;
}
.m-card-row b {
    color: var(--card-title);
    font-weight: 600;
    overflow-wrap: anywhere;
}
.m-card-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ── Cards de vínculo do jogador (tela Jogadores) ── */
.link-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
    padding: 14px 16px;
    border-radius: var(--card-radius);
    border: var(--card-border);
    background: var(--card-bg);
    box-shadow: var(--card-shadow);
    transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}
.link-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 215, 64, 0.35);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4);
}
.link-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}
.link-card-balance {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.link-card-balance .label {
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 10px;
    color: #9DB8AA;
}
.link-card-balance .value {
    font-size: 22px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    background: linear-gradient(180deg, #FFF6D8, #F5C542 70%, #D19A25);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.link-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

/* ── Cards de clube (Meus Clubes) — HUD de jogo ── */
.club-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
    padding: 16px;
    border-radius: var(--card-radius);
    border: var(--card-border);
    background: linear-gradient(165deg, rgba(16, 58, 42, 0.5) 0%, rgba(6, 18, 12, 0.75) 65%);
    box-shadow: var(--card-shadow);
    transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}
.club-card::before {
    /* Naipe-marca d'água (\FE0E força glifo de texto, não emoji) */
    content: "\2660\FE0E";
    position: absolute;
    right: -14px;
    bottom: -34px;
    font-size: 130px;
    line-height: 1;
    color: rgba(255, 255, 255, 0.045);
    pointer-events: none;
}
.club-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 215, 64, 0.35);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
}
.club-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
}
.club-card-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 17px;
    color: #3A2A05;
    background: linear-gradient(135deg, #F5C542, #C98A1B);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.club-card-status {
    margin-left: auto;
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    border-radius: 999px;
    padding: 3px 10px;
}
.club-card-status.on  { color: #7FC79B; background: rgba(46, 160, 67, 0.15); border: 1px solid rgba(46, 160, 67, 0.4); }
.club-card-status.off { color: #F85149; background: rgba(248, 81, 73, 0.12); border: 1px solid rgba(248, 81, 73, 0.4); }

.club-card-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.club-card-stats .stat {
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 10px 12px;
    min-width: 0;
}
.club-card-stats .label {
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 10px;
    color: #9DB8AA;
}
.club-card-stats .value {
    font-size: 20px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
/* Nomes v-* para não colidir com classes utilitárias globais (como aconteceu com .red/.green).
   O !important precisa estar TAMBÉM no background-clip: o shorthand background !important
   reseta o clip para border-box e o texto-gradiente vira uma barra sólida. */
.club-card-stats .value.v-gold {
    background: linear-gradient(180deg, #FFF6D8, #F5C542 70%, #D19A25) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    color: transparent !important;
}
.club-card-stats .value.v-green {
    color: #00e676 !important;
    background: none !important;
}
.club-card-stats .hint { display: block; font-size: 10px; color: #6E8078; }

.club-card-info .row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    padding: 4px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.07);
}
.club-card-info .row:last-child { border-bottom: 0; }
.club-card-info .row span { color: #9DB8AA; }
.club-card-info .row b { font-weight: 600; text-align: right; }

.club-card-actions { margin-top: auto; }

/* ═══════════ Tabelas: skin de jogo + responsivas no mobile ═══════════ */
/* Rolagem horizontal em vez de esmagar as colunas em telas estreitas */
.mud-table-container { overflow-x: auto; }
.mud-simple-table table { min-width: 560px; }

/* Cabeçalho estilo "rail" da mesa: feltro + fio dourado */
.mud-simple-table thead th,
.mud-table thead th.mud-table-cell {
    text-transform: uppercase;
    font-size: 11px !important;
    font-weight: 700;
    letter-spacing: 0.08em;
    white-space: nowrap;
    color: #9DB8AA !important;
    background: linear-gradient(180deg, rgba(16, 58, 42, 0.55), rgba(11, 36, 25, 0.55));
    border-bottom: 2px solid rgba(255, 215, 64, 0.35) !important;
}

.mud-simple-table tbody td { white-space: nowrap; }
.mud-simple-table tbody tr { transition: background 0.12s ease; }
.mud-simple-table tbody tr:hover,
.mud-table tbody tr.mud-table-row:hover {
    background: rgba(255, 215, 64, 0.05) !important;
}

/* ═══════════ Grids no mobile: extrato estilo app de banco ═══════════ */
/* mc-only: célula que existe só no card mobile (no desktop a informação já
   está no filtro/contexto). Dentro do media, o display:block genérico vence. */
.mobile-cards td.mc-only { display: none; }

/* Contrato: MudSimpleTable com Class="mobile-cards". Cada linha vira um card;
   as células declaram seu papel via classe no <td>:
     mc-title  → informação principal (grande, à esquerda)
     mc-amount → valor em destaque (grande, à direita, centralizado vertical)
     mc-sub    → linha secundária sob o título
     mc-hide   → some no mobile (detalhe redundante)
     (demais)  → linhas pequenas; data-label="X" imprime a legenda antes
   No desktop nada muda — a tabela continua tabela. */
@media (max-width: 700px) {
    /* Desfaz o layout de tabela por completo (display com !important para
       vencer os estilos do MudBlazor) — sem isso o thead continua visível e
       a table encolhe para a largura do conteúdo, espremendo os cards */
    .mobile-cards .mud-table-container { overflow-x: visible !important; }
    .mobile-cards table {
        display: block !important;
        min-width: 0 !important;
        width: 100% !important;
    }
    .mobile-cards thead { display: none !important; }
    .mobile-cards tbody { display: block !important; width: 100%; }

    .mobile-cards tbody tr {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        width: 100%;
        box-sizing: border-box;
        gap: 3px 12px;
        padding: 14px 16px;
        margin: 10px 0;
        border-radius: var(--card-radius);
        border: var(--card-border);
        background: var(--card-bg);
        box-shadow: var(--card-shadow);
    }
    .mobile-cards tbody tr:hover { background: linear-gradient(160deg, rgba(255, 215, 64, 0.05), rgba(3, 26, 16, 0.4)) !important; }

    .mobile-cards tbody td {
        display: block !important;
        grid-column: 1;
        min-width: 0;
        border: none !important;
        padding: 0 !important;
        white-space: normal !important;
        font-size: 12.5px;
        color: var(--card-muted);
        height: auto !important;
        overflow-wrap: anywhere;
    }

    .mobile-cards td.mc-title { color: var(--card-title); }
    .mobile-cards td.mc-title,
    .mobile-cards td.mc-title .mud-typography:not(.mud-typography-caption) {
        font-size: 16px !important;
        font-weight: 800 !important;
        line-height: 1.25 !important;
    }
    /* Legenda embutida no título (ex.: clube do pedido) segue o padrão do subtítulo */
    .mobile-cards td.mc-title .mud-typography-caption {
        display: block;
        font-size: 12px !important;
        font-weight: 600 !important;
        color: var(--card-accent) !important;
    }
    /* Chip usado como título do card (extrato/histórico) ganha presença */
    .mobile-cards td.mc-title .mud-chip {
        margin: 0;
        height: 26px;
        font-size: 13px;
        font-weight: 700;
    }

    .mobile-cards td.mc-amount {
        grid-column: 2;
        grid-row: 1 / span 3;
        align-self: center;
        justify-self: end;
        text-align: right;
        color: var(--card-title);
        white-space: nowrap !important;
    }
    .mobile-cards td.mc-amount,
    .mobile-cards td.mc-amount .mud-typography {
        font-size: 18px !important;
        font-weight: 800 !important;
        font-variant-numeric: tabular-nums;
    }

    /* Subtítulo em teal, como a linha de plataforma nos cards de Bots/Clubes/Caixas */
    .mobile-cards td.mc-sub {
        font-size: 12px;
        font-weight: 600;
        color: var(--card-accent);
    }
    .mobile-cards td.mc-hide { display: none; }
    /* (mc-only definido fora do media: visível só no card mobile) */

    /* Rodapé do card (ex.: saldo após o lançamento): largura total, sempre por
       último (order), rótulo à esquerda e valor à direita, separado por linha sutil */
    .mobile-cards td.mc-foot {
        grid-column: 1 / -1;
        order: 99;
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        margin-top: 8px;
        padding-top: 8px !important;
        border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
        font-size: 13.5px;
        font-weight: 700;
        color: var(--card-title);
        font-variant-numeric: tabular-nums;
    }

    /* Linha de ações do card: largura total, separada por linha sutil */
    .mobile-cards td.mc-actions {
        grid-column: 1 / -1;
        display: flex !important;
        align-items: center;
        gap: 10px;
        margin-top: 10px;
        padding-top: 10px !important;
        border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
    }
    .mobile-cards td.mc-actions::before { display: none; }
    .mobile-cards td.mc-actions .mud-button-root { flex: 1; }

    .mobile-cards td[data-label]::before {
        content: attr(data-label) "  ";
        text-transform: uppercase;
        letter-spacing: 0.08em;
        font-size: 10px;
        color: var(--card-label);
    }

    /* Chips ficam compactos dentro dos cards */
    .mobile-cards .mud-chip { margin: 2px 0; }
}

/* MudTable empilhada (Breakpoint="Sm") com o mesmo visual de card do mobile-cards.
   A classe .mud-table-small está sempre presente na MudTable com Breakpoint;
   o empilhamento real acontece via media query do MudBlazor (sm = 600px) —
   por isso o skin também precisa estar escopado à mesma largura. */
@media (max-width: 600px) {
    .mud-table-small .mud-table-body .mud-table-row {
        display: block;
        margin: 10px 0;
        padding: 10px 12px;
        border-radius: var(--card-radius);
        border: var(--card-border);
        background: var(--card-bg);
        box-shadow: var(--card-shadow);
    }
    .mud-table-small .mud-table-body .mud-table-cell {
        border-bottom: none !important;
        font-size: 12.5px;
        color: var(--card-muted);
        /* Nomes de tipo/erro longos (sem espaço) quebram em vez de alargar a página */
        overflow-wrap: anywhere;
        white-space: normal !important;
    }
    /* Primeira célula (nome/identificação) vira o título do card, sem rótulo */
    .mud-table-small .mud-table-body .mud-table-cell:first-child:not(.mud-table-cell-checkbox),
    .mud-table-small .mud-table-body .mud-table-cell:first-child:not(.mud-table-cell-checkbox) .mud-typography:not(.mud-typography-caption) {
        font-size: 16px !important;
        font-weight: 800 !important;
        color: var(--card-title);
        line-height: 1.25;
    }
    .mud-table-small .mud-table-body .mud-table-cell:first-child:not(.mud-table-cell-checkbox)::before {
        display: none;
    }
    .mud-table-small .mud-table-body .mud-table-cell::before {
        color: var(--card-label) !important;
        text-transform: uppercase;
        font-size: 10px;
        letter-spacing: 0.08em;
    }
}

/* ═══════════ Caixas (admin): grid no desktop, cards no mobile ═══════════ */
.caixa-cards { display: none; }

@media (max-width: 700px) {
    .caixa-desktop { display: none; }

    .caixa-cards {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .caixa-card {
        border-radius: var(--card-radius);
        border: var(--card-border);
        background: var(--card-bg);
        box-shadow: var(--card-shadow);
        padding: 14px 16px 12px;
    }

    .caixa-card-head {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 12px;
    }
    .caixa-card-title { min-width: 0; }
    .caixa-card-name {
        display: block;
        font-size: 16px;
        font-weight: 800;
        color: var(--card-title);
        line-height: 1.25;
        overflow-wrap: anywhere;
    }
    .caixa-card-sub {
        display: block;
        font-size: 12px;
        font-weight: 600;
        color: var(--card-accent);
        margin-top: 2px;
    }
    .caixa-card-owner {
        display: block;
        font-size: 11.5px;
        color: var(--card-muted);
        margin-top: 3px;
    }

    .caixa-card-balance {
        text-align: right;
        font-size: 18px;
        font-weight: 800;
        color: var(--card-title);
        font-variant-numeric: tabular-nums;
        white-space: nowrap;
        flex-shrink: 0;
    }
    .caixa-card-balance-label {
        display: block;
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 0.12em;
        color: var(--card-label);
    }
    .caixa-card-balance.pos { color: #66BB6A; }
    .caixa-card-balance.neg { color: #E4574F; }

    .caixa-card-actions {
        display: flex;
        gap: 10px;
        margin-top: 12px;
        padding-top: 10px;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
    }
}

/* ═══════════ Bottom nav (mobile) ═══════════ */
/* Barra fixa inferior com os destinos principais do perfil; Início elevado ao
   centro com glow teal. Só existe no mobile — no desktop o lobby é o menu. */
.bottom-nav { display: none; }

@media (max-width: 700px) {
    .bottom-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        /* Abaixo de popovers/diálogos do MudBlazor — menus não podem ficar atrás da barra */
        z-index: 1090;
        display: flex;
        align-items: stretch;
        gap: 2px;
        padding: 6px 8px calc(8px + env(safe-area-inset-bottom));
        background: rgba(7, 20, 14, 0.92);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.45);
    }

    .bottom-nav-item,
    .bottom-nav-home {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-end;
        gap: 3px;
        padding: 6px 2px 2px;
        background: none;
        border: 0;
        border-radius: 12px;
        color: #9DB8AA;
        font-family: inherit;
        font-size: 10.5px;
        font-weight: 600;
        cursor: pointer;
        transition: color 0.15s ease;
    }
    .bottom-nav-item .mud-icon-root { font-size: 23px; width: 23px; height: 23px; }
    .bottom-nav-item span,
    .bottom-nav-home span:last-child {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 100%;
    }

    .bottom-nav-item.active { color: #00E5C3; }
    .bottom-nav-item.active .mud-icon-root {
        filter: drop-shadow(0 0 9px rgba(0, 191, 166, 0.85));
    }

    /* Início: botão circular elevado ao centro, com glow */
    .bottom-nav-home { flex: 1.1; }
    .bottom-nav-home-btn {
        width: 52px;
        height: 52px;
        margin-top: -26px;
        border-radius: 50%;
        display: grid;
        place-items: center;
        background: linear-gradient(160deg, #0E4F3F, #072A1F 75%);
        border: 1.5px solid rgba(0, 191, 166, 0.55);
        color: #00E5C3;
        box-shadow: 0 0 18px rgba(0, 191, 166, 0.3), 0 8px 18px rgba(0, 0, 0, 0.5);
        transition: box-shadow 0.15s ease, border-color 0.15s ease;
    }
    .bottom-nav-home-btn .mud-icon-root { font-size: 26px; width: 26px; height: 26px; }
    .bottom-nav-home.active { color: #00E5C3; }
    .bottom-nav-home.active .bottom-nav-home-btn {
        border-color: #00E5C3;
        box-shadow: 0 0 26px rgba(0, 191, 166, 0.55), 0 8px 18px rgba(0, 0, 0, 0.5);
    }

    /* Conteúdo não fica escondido atrás da barra */
    .mud-main-content { padding-bottom: 96px !important; }

    /* Com a bottom nav, os atalhos da barra de seção são redundantes no mobile */
    .section-quick { display: none; }
}

/* ═══════════ Popovers (menus/selects) no mobile ═══════════ */
/* Rede de segurança: conteúdo de menu nunca estoura a viewport — limita
   largura/altura e rola por dentro em vez de ser cortado */
@media (max-width: 700px) {
    .mud-popover {
        max-width: calc(100vw - 24px);
        max-height: 65vh;
        overflow-y: auto;
    }
    /* Menus dimensionam pelo conteúdo, nunca mais estreitos que o legível */
    .mud-popover .mud-menu-list,
    .mud-popover .mud-list {
        min-width: 220px;
    }
}

/* ═══════════ Diálogos no mobile ═══════════ */
/* Modais (extrato, limites, etc.) ocupam a largura toda da tela em vez de
   herdar as larguras de desktop do MudBlazor — evita corte/rolagem lateral */
@media (max-width: 700px) {
    .mud-dialog:not(.mud-dialog-fullscreen) {
        width: calc(100vw - 16px) !important;
        max-width: calc(100vw - 16px) !important;
        margin: 8px !important;
        max-height: calc(100vh - 16px);
    }
    .mud-dialog .mud-dialog-content {
        padding: 12px !important;
        overflow-x: hidden;
    }
}

/* ── Pill de usuário na appbar (nome + perfil, como no lobby de jogo) ── */
.user-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 4px 12px 4px 4px;
    cursor: pointer;
    transition: background 0.15s ease;
}
.user-pill:hover { background: rgba(255, 255, 255, 0.12); }
.user-pill:focus-visible { outline: 2px solid #FFD740; outline-offset: 2px; }
.user-pill-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #F5C542, #C98A1B);
    display: grid;
    place-items: center;
    font-weight: 800;
    color: #3A2A05;
    font-size: 13px;
    flex-shrink: 0;
}
.user-pill-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    text-align: left;
    max-width: 180px;
}
.user-pill-info b {
    font-size: 13px;
    color: #E6EDF3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-pill-info > span { font-size: 11px; color: #9DB8AA; }
@media (max-width: 600px) {
    .user-pill-info { display: none; }
    .user-pill { padding: 4px; }
}

/* ── Barra de seção (dentro de uma função) ── */
.section-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 8px 10px;
    background: linear-gradient(180deg, #103A2A 0%, #0B2419 100%);
    border: 1px solid rgba(255, 215, 64, 0.18);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}
.section-back {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 215, 64, 0.1);
    color: #FFD740;
    border: 1px solid rgba(255, 215, 64, 0.35);
    border-radius: 999px;
    padding: 6px 16px 6px 12px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease;
}
.section-back:hover { background: rgba(255, 215, 64, 0.2); }
.section-back:focus-visible { outline: 2px solid #FFD740; outline-offset: 2px; }
.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 15px;
    color: #E6EDF3;
    padding: 6px 14px;
    border-radius: 8px;
}
.section-quick {
    margin-left: auto;
    display: flex;
    gap: 4px;
}
.section-quick-btn {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    background: none;
    border: 0;
    border-radius: 8px;
    color: #9DB8AA;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}
.section-quick-btn:hover { color: #FFD740; background: rgba(255, 255, 255, 0.06); }
.section-quick-btn:focus-visible { outline: 2px solid #FFD740; outline-offset: -2px; }

@media (max-width: 700px) {
    .lobby-balance { font-size: 34px; }
    .section-quick { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .lobby-tile, .lobby-cta, .stat-card { transition: none; }
}

/* Card hover transitions */
.mud-card {
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}
.mud-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
}

/* Zebra-striping for simple tables */
.mud-table-body tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.02);
}

/* Dashboard stat card gradient styles — poker-chip panels */
.stat-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background-image: linear-gradient(160deg, rgba(255, 255, 255, 0.03) 0%, transparent 60%);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}
.stat-card-primary::before { background: linear-gradient(90deg, #00BFA6, #00897B); }
.stat-card-warning::before { background: linear-gradient(90deg, #D29922, #E3B341); }
.stat-card-success::before { background: linear-gradient(90deg, #2EA043, #3FB950); }
.stat-card-error::before   { background: linear-gradient(90deg, #F85149, #DA3633); }
.stat-card-info::before    { background: linear-gradient(90deg, #58A6FF, #79C0FF); }
.stat-card-purple::before  { background: linear-gradient(90deg, #7C4DFF, #B388FF); }

/* Icon circle for dashboard */
.icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.icon-circle-primary   { background: rgba(0, 191, 166, 0.12); color: #00BFA6; }
.icon-circle-warning   { background: rgba(210, 153, 34, 0.12); color: #D29922; }
.icon-circle-success   { background: rgba(46, 160, 67, 0.12); color: #2EA043; }
.icon-circle-error     { background: rgba(248, 81, 73, 0.12); color: #F85149; }
.icon-circle-info      { background: rgba(88, 166, 255, 0.12); color: #58A6FF; }
.icon-circle-purple    { background: rgba(124, 77, 255, 0.12); color: #7C4DFF; }

/* NavLink active indicator */
.mud-nav-link.active {
    border-left: 3px solid #00BFA6 !important;
    background: rgba(0, 191, 166, 0.08) !important;
}

/* Login/Register gradient background */
.auth-bg {
    background: linear-gradient(135deg, #0D1117 0%, #121829 50%, #161B22 100%);
    min-height: 100vh;
}

/* Blazor error UI */
#blazor-error-ui {
    background: #b32121;
    color: white;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}
    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }
