/* ==========================================================================
   INDEX SHELL — estilos extraídos do index.html (sem inline style)
   Login, audio-gate, lobby, edição de mesa, top-nav, painéis, chat
   ========================================================================== */

/* ---------- Audio Gate / Portão "O Mundo Aguarda" (após login, antes do lobby) ---------- */
#audio-gate-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    /* Acima do lobby (999999), abaixo do login (10000000) */
    z-index: 1500000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#audio-gate-overlay h1 {
    color: #d4af37;
    font-family: 'Cinzel', serif;
    font-size: 40px;
    letter-spacing: 5px;
    text-transform: uppercase;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}

#audio-gate-overlay p {
    color: #888;
    font-style: italic;
    margin-bottom: 40px;
}

#btn-enter-lobby {
    background: transparent;
    border: 2px solid #d4af37;
    color: #d4af37;
    padding: 15px 40px;
    font-size: 18px;
    font-family: 'Cinzel', serif;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.2), inset 0 0 10px rgba(212, 175, 55, 0.1);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ---------- Login: campos e botões (complemento ao core.css) ---------- */
#auth-role {
    width: 100%;
    margin-bottom: 20px;
}

.login-actions {
    display: flex;
    gap: 10px;
}

.login-actions .btn-login-enter {
    flex: 1;
    background: linear-gradient(135deg, #ffca28, #f57f17);
    color: #000;
    font-weight: bold;
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.login-actions .btn-login-register {
    flex: 1;
    background: linear-gradient(135deg, #333, #111);
    color: #aaa;
    border: 1px solid #555;
}

#auth-msg {
    color: #ffca28;
    font-size: 13px;
    margin-top: 15px;
    font-style: italic;
}

/* ---------- Lobby de campanhas ---------- */
#lobby-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 10, 0.95);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.lobby-panel {
    background: linear-gradient(135deg, #1a1525, #0a0a0a);
    border: 2px solid #d4af37;
    border-radius: 8px;
    width: 500px;
    max-width: 90%;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.lobby-panel > h2 {
    color: #ffca28;
    text-align: center;
    margin-top: 0;
}

#lista-mesas {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
}

#lobby-mestre-controls {
    display: none;
    border-top: 1px dashed #555;
    padding-top: 15px;
}

.lobby-field {
    width: 100%;
    padding: 8px;
    background: #000;
    border: 1px solid #444;
    color: #fff;
    margin-bottom: 10px;
    border-radius: 4px;
    box-sizing: border-box;
}

.lobby-field-textarea {
    width: 100%;
    height: 60px;
    padding: 8px;
    background: #000;
    border: 1px solid #444;
    color: #fff;
    margin-bottom: 10px;
    border-radius: 4px;
    box-sizing: border-box;
    resize: none;
}

.lobby-field-musica {
    margin-bottom: 15px;
}

.btn-forjar-campanha {
    width: 100%;
    background: linear-gradient(135deg, #4caf50, #1b5e20);
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
}

/* ---------- Editar campanha ---------- */
#edit-mesa-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.edit-mesa-panel {
    background: #111;
    border: 2px solid #d4af37;
    border-radius: 12px;
    width: 450px;
    max-width: 90%;
    padding: 25px;
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
}

.edit-mesa-panel > h2 {
    color: #ffca28;
    text-align: center;
    margin-top: 0;
    font-family: 'Cinzel', serif;
}

.edit-mesa-label {
    color: #aaa;
    font-size: 11px;
}

.edit-mesa-field {
    width: 100%;
    padding: 10px;
    background: #000;
    border: 1px solid #444;
    color: #fff;
    margin-bottom: 15px;
    border-radius: 6px;
    box-sizing: border-box;
}

.edit-mesa-field-textarea {
    width: 100%;
    height: 80px;
    padding: 10px;
    background: #000;
    border: 1px solid #444;
    color: #fff;
    margin-bottom: 15px;
    border-radius: 6px;
    resize: none;
    box-sizing: border-box;
}

.edit-mesa-field-last {
    margin-bottom: 20px;
}

.edit-mesa-actions {
    display: flex;
    gap: 10px;
}

.btn-edit-cancelar {
    flex: 1;
    background: #333;
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
}

.btn-edit-salvar {
    flex: 2;
    background: linear-gradient(135deg, #d4af37, #aa8a2e);
    color: #000;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
}

/* Custom Elegant Scrollbars (Dourado / Obsidiana) */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(10, 5, 5, 0.6);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #d4af37, #5a3c22);
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.5);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ffca28, #d4af37);
}

/* ---------- Top nav ---------- */
#top-nav {
    display: none;
    transition: width 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

#btn-toggle-menu {
    width: 100%;
    background: linear-gradient(to bottom, #1a0a0a, #0a0505);
    color: #d4c5b0;
    border: none;
    padding: 10px 20px;
    font-family: 'Georgia', serif;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    outline: none;
    border-bottom: 1px solid #3a0000;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

#btn-toggle-menu:hover {
    color: #ffca28;
    background: #2b0000;
}

#btn-nav-olhodeus {
    display: none;
    background: linear-gradient(135deg, #e91e63, #4a148c);
    color: #fff;
}

.btn-nav-perfil {
    background: linear-gradient(135deg, #111, #000);
    border-color: #ffca28;
    color: #ffca28;
}

#btn-nav-jukebox {
    display: none;
}

/* Esconder conteúdo quando nav está colapsada (no modo topo) */
#top-nav.nav-collapsed:not(.nav-lateral-mode) .nav-content-wrapper,
#top-nav.nav-collapsed:not(.nav-lateral-mode) #nav-identity-box {
    max-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    overflow: hidden !important;
}

/* ---------- Painel Mestre ---------- */
#mestre-painel {
    display: none;
    background: linear-gradient(135deg, #231245, #14092b);
    padding: 10px 18px;
    border: 1px solid rgba(179, 157, 219, 0.3);
    border-radius: 8px;
    align-items: center;
    gap: 12px;
    margin: 6px 20px 10px 20px;
    justify-content: center;
    flex-wrap: wrap;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.6), 0 4px 12px rgba(0, 0, 0, 0.4);
    box-sizing: border-box;
}

#mestre-painel > strong {
    color: #d1c4e9;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
    text-shadow: 0 0 6px rgba(179, 157, 219, 0.4);
}

#select-jogador-mestre {
    min-width: 180px;
    max-width: 240px;
    background: #311b92;
    color: #fff;
    border: 1px solid #512da8;
    border-radius: 4px;
    padding: 6px 10px;
    font-weight: bold;
}

.btn-gm-nova-ficha,
.btn-gm-monstro,
.btn-gm-deletar,
.btn-gm-veiculos,
.btn-player-criar {
    border-radius: 5px;
    font-weight: 700;
    cursor: pointer;
    font-size: 12px;
    padding: 8px 14px;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.2s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
    box-sizing: border-box;
}

.btn-gm-nova-ficha {
    background: linear-gradient(135deg, #4caf50, #1b5e20);
    color: white;
    border: 1px solid #2e7d32;
}

.btn-gm-nova-ficha:hover {
    background: linear-gradient(135deg, #66bb6a, #2e7d32);
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.4);
}

.btn-gm-monstro {
    background: linear-gradient(135deg, #e53935, #8b0000);
    color: white;
    border: 1px solid #b71c1c;
}

.btn-gm-monstro:hover {
    background: linear-gradient(135deg, #ef5350, #b71c1c);
    box-shadow: 0 0 10px rgba(229, 57, 53, 0.4);
}

.btn-gm-deletar {
    background: linear-gradient(135deg, #d32f2f, #7f0000);
    color: white;
    border: 1px solid #9a0007;
}

.btn-gm-deletar:hover {
    background: linear-gradient(135deg, #e53935, #b71c1c);
    box-shadow: 0 0 10px rgba(211, 47, 47, 0.4);
}

.btn-gm-veiculos {
    background: linear-gradient(135deg, #ff8f00, #c76a00);
    color: white;
    border: 1px solid #e65100;
}

.btn-gm-veiculos:hover {
    background: linear-gradient(135deg, #ffa000, #e65100);
    box-shadow: 0 0 10px rgba(255, 143, 0, 0.4);
}

/* ---------- Painel Player ---------- */
#player-painel {
    display: none;
    background: linear-gradient(135deg, #0c2b5e, #061838);
    padding: 10px 18px;
    border: 1px solid rgba(144, 202, 249, 0.3);
    border-radius: 8px;
    align-items: center;
    gap: 12px;
    margin: 6px 20px 10px 20px;
    justify-content: center;
    flex-wrap: wrap;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.6), 0 4px 12px rgba(0, 0, 0, 0.4);
    box-sizing: border-box;
}

#player-painel > strong {
    color: #bbdefb;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
    text-shadow: 0 0 6px rgba(144, 202, 249, 0.4);
}

#select-minha-ficha {
    min-width: 180px;
    max-width: 240px;
    background: #1565c0;
    color: #fff;
    border: 1px solid #0d47a1;
    border-radius: 4px;
    padding: 6px 10px;
    font-weight: bold;
}

.btn-player-criar {
    background: linear-gradient(135deg, #2e7d32, #1b5e20);
    color: white;
    border: 1px solid #1b5e20;
}

.btn-player-criar:hover {
    background: linear-gradient(135deg, #4caf50, #2e7d32);
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.4);
}

/* Caixa de Identidade no Topo */
#nav-identity-box {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    margin-right: 15px;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 6px;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

#nav-identity-box:hover {
    border-color: rgba(212, 175, 55, 0.5);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.15), inset 0 0 10px rgba(0, 0, 0, 0.7);
}

.nav-identity-label {
    color: #ffca28;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.nav-identity-input {
    background: #0a0a0a !important;
    color: #ffca28 !important;
    border: 1px solid #444 !important;
    border-radius: 4px !important;
    padding: 5px 8px !important;
    width: 120px !important;
    font-weight: bold !important;
    text-align: center !important;
    font-size: 12px !important;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box !important;
}

.nav-identity-input:focus {
    border-color: #ffca28 !important;
    box-shadow: 0 0 8px rgba(255, 202, 40, 0.4) !important;
    outline: none;
}

.btn-nav-logout {
    background: linear-gradient(135deg, #d32f2f, #9a0007) !important;
    color: #fff !important;
    font-weight: bold !important;
    font-size: 12px !important;
    padding: 6px 14px !important;
    border: 1px solid #b71c1c !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    white-space: nowrap !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4) !important;
}

.btn-nav-logout:hover {
    background: linear-gradient(135deg, #f44336, #c62828) !important;
    box-shadow: 0 0 10px rgba(244, 67, 54, 0.4) !important;
    transform: translateY(-1px);
}

.custom-ficha-ui {
    box-sizing: border-box;
    max-width: 100%;
}

/* ---------- Main container + chat ---------- */
#main-container {
    display: none;
    gap: 15px;
    flex: 1;
    height: calc(100vh - 140px);
    overflow: hidden;
}

#workspace {
    flex: 3;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding-right: 10px;
}

#app-missoes {
    display: none;
}

#global-chat {
    flex: 1;
    min-width: 300px;
    max-width: 350px;
    height: 100%;
}

#global-chat > .secao {
    display: flex;
    flex-direction: column;
    height: 100%;
    margin-bottom: 0;
    box-sizing: border-box;
}

.chat-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed #444;
    padding-bottom: 5px;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.chat-header-row h2 {
    border: none;
    margin: 0;
    padding: 0;
}

.chat-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

#chat-box {
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
    margin-bottom: 5px;
}

#global-chat .input-group {
    margin-top: auto;
    flex-shrink: 0;
}

/* ==========================================================================
   NAV LATERAL (SIDEBAR) — ativada pela classe body.nav-lateral
   ========================================================================== */
body.nav-lateral {
    flex-direction: row;
    padding: 0;
    gap: 0;
}

body.nav-lateral #top-nav {
    width: 240px;
    min-width: 240px;
    max-width: 240px;
    flex-shrink: 0;
    height: 100vh;
    border-bottom: none;
    border-right: 2px solid #3a0000;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    background: rgba(8, 4, 4, 0.95);
    box-sizing: border-box;
    transition: width 0.3s cubic-bezier(0.25, 1, 0.5, 1), min-width 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

/* BOTÃO DE RECOLHER/EXPANDIR VISÍVEL NA SIDEBAR */
body.nav-lateral #btn-toggle-menu {
    display: flex !important;
    width: 100% !important;
    padding: 10px 8px !important;
    font-size: 11px !important;
    background: linear-gradient(180deg, #250a0a, #110505) !important;
    color: #ffca28 !important;
    border-bottom: 1px solid #3a0000 !important;
    cursor: pointer !important;
    justify-content: center !important;
    align-items: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
}

body.nav-lateral #btn-toggle-menu:hover {
    background: #3a0000 !important;
    color: #fff !important;
}

/* ESTADO RECOLHIDO/COLLAPSED DA SIDEBAR LATERAL — BARRA DE ATALHOS RÁPIDOS */
body.nav-lateral #top-nav.nav-collapsed {
    width: 56px !important;
    min-width: 56px !important;
    max-width: 56px !important;
}

body.nav-lateral #top-nav.nav-collapsed #btn-toggle-menu {
    padding: 12px 0 !important;
    justify-content: center !important;
    align-items: center !important;
}

body.nav-lateral #top-nav.nav-collapsed #btn-toggle-menu span {
    font-size: 0 !important;
    letter-spacing: 0 !important;
}

body.nav-lateral #top-nav.nav-collapsed #btn-toggle-menu span::before {
    content: '⚙️ ▶' !important;
    font-size: 15px !important;
    color: #ffca28 !important;
}

body.nav-lateral #top-nav.nav-collapsed #btn-toggle-menu span::after {
    content: '' !important;
}

/* Oculta os painéis extras no modo atalho rápido */
body.nav-lateral #top-nav.nav-collapsed #mestre-painel,
body.nav-lateral #top-nav.nav-collapsed #player-painel,
body.nav-lateral #top-nav.nav-collapsed #nav-identity-box {
    display: none !important;
}

/* Mantém o wrapper e itens visíveis como ícones de atalho */
body.nav-lateral #top-nav.nav-collapsed .nav-content-wrapper {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    padding: 8px 0 !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

body.nav-lateral #top-nav.nav-collapsed .nav-items {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    padding: 6px 0 !important;
    gap: 8px !important;
    width: 100% !important;
}

/* Transformação dos botões da nav em ícones de atalho rápido quadrados */
body.nav-lateral #top-nav.nav-collapsed .nav-items button {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    padding: 0 !important;
    margin: 0 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5) !important;
    border: 1px solid rgba(212, 175, 55, 0.2) !important;
    background: rgba(20, 10, 10, 0.7) !important;
    transition: all 0.2s ease !important;
    letter-spacing: normal !important;
}

body.nav-lateral #top-nav.nav-collapsed .nav-items button .nav-text {
    display: none !important;
}

body.nav-lateral #top-nav.nav-collapsed .nav-items button .nav-icon {
    font-size: 20px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
}

.nav-icon-img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
    display: inline-block;
}

body.nav-lateral #top-nav.nav-collapsed .nav-items button:hover {
    background: rgba(45, 20, 20, 0.9) !important;
    border-color: #ffca28 !important;
    box-shadow: 0 0 10px rgba(255, 202, 40, 0.4) !important;
    transform: scale(1.08) !important;
}

body.nav-lateral #top-nav.nav-collapsed .nav-items button.active {
    background: linear-gradient(135deg, #d4af37, #8a6d1b) !important;
    color: #000 !important;
    border-color: #ffca28 !important;
    box-shadow: 0 0 12px rgba(255, 202, 40, 0.6) !important;
}

body.nav-lateral #top-nav .nav-content-wrapper {
    max-height: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-bottom: 15px;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
}

body.nav-lateral #top-nav .nav-items {
    flex-direction: column;
    align-items: stretch;
    padding: 10px 8px;
    gap: 6px;
    max-height: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    box-sizing: border-box;
}

body.nav-lateral #top-nav .nav-items button {
    width: 100%;
    text-align: left;
    font-size: 12px;
    padding: 9px 12px;
    border-radius: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 8px;
    box-sizing: border-box;
}

body.nav-lateral #top-nav .nav-items button::before,
body.nav-lateral #top-nav .nav-items button::after {
    display: none;
}

/* Painéis Mestre e Jogador no modo lateral (Grid 2 colunas para botões sem cortes!) */
body.nav-lateral #mestre-painel,
body.nav-lateral #player-painel {
    flex-direction: column;
    margin: 8px;
    width: calc(100% - 16px);
    box-sizing: border-box;
    align-items: stretch;
    justify-content: flex-start;
    padding: 10px 8px;
    gap: 8px;
    max-height: none;
    overflow: visible;
}

body.nav-lateral #mestre-painel > strong,
body.nav-lateral #player-painel > strong {
    text-align: center;
    display: block;
    width: 100%;
    margin-bottom: 2px;
}

body.nav-lateral #mestre-painel select,
body.nav-lateral #player-painel select {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

body.nav-lateral .custom-ficha-ui {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

body.nav-lateral .ficha-btn-dropdown {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 8px 10px !important;
    font-size: 12px !important;
}

body.nav-lateral .ficha-dropdown-content {
    width: 230px !important;
    max-width: calc(100vw - 20px) !important;
    box-sizing: border-box !important;
}

/* Botões do Mestre em grade 2 colunas para caberem perfeitamente sem rolar ou cortar */
body.nav-lateral #mestre-painel {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
}

body.nav-lateral #mestre-painel > strong,
body.nav-lateral #mestre-painel .custom-ficha-ui,
body.nav-lateral #mestre-painel select {
    width: 100% !important;
    flex: 0 0 100%;
}

body.nav-lateral #mestre-painel .btn-gm-nova-ficha,
body.nav-lateral #mestre-painel .btn-gm-monstro,
body.nav-lateral #mestre-painel .btn-gm-deletar,
body.nav-lateral #mestre-painel .btn-gm-veiculos {
    flex: 1 1 calc(50% - 4px) !important;
    min-width: 90px !important;
    width: auto !important;
    box-sizing: border-box !important;
    padding: 8px 4px !important;
    font-size: 11px !important;
    text-align: center !important;
    justify-content: center !important;
}

body.nav-lateral #player-painel .btn-player-criar {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 8px 10px !important;
    font-size: 12px !important;
}

/* Caixa de Identidade no modo lateral */
body.nav-lateral #nav-identity-box {
    margin: 10px 8px 15px 8px;
    width: calc(100% - 16px);
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px;
    box-sizing: border-box;
    order: 10;
}

body.nav-lateral .nav-identity-label {
    text-align: center;
}

body.nav-lateral .nav-identity-input {
    width: 100% !important;
    box-sizing: border-box !important;
}

body.nav-lateral .btn-nav-logout {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 8px 10px !important;
}

body.nav-lateral #main-container {
    flex: 1;
    height: 100vh;
    padding: 15px;
    overflow: hidden;
}

/* ==========================================================================
   MODAL DE CONFIGURAÇÕES
   ========================================================================== */
#modal-configuracoes {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 800000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.cfg-panel {
    background: linear-gradient(135deg, #1a1525, #0a0a0a);
    border: 2px solid #d4af37;
    border-radius: 8px;
    width: 460px;
    max-width: 92vw;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9);
}

.cfg-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid #2a2a2a;
}

.cfg-header h2 {
    color: #ffca28;
    margin: 0;
    font-family: 'Georgia', serif;
    font-size: 17px;
    letter-spacing: 1px;
}

.cfg-close-btn {
    background: none;
    border: none;
    color: #777;
    font-size: 17px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.2s;
}

.cfg-close-btn:hover { color: #fff; }

.cfg-body {
    padding: 18px;
}

.cfg-section {
    margin-bottom: 18px;
}

.cfg-section h3 {
    color: #b39ddb;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0 0 14px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid #2a2a2a;
}

.cfg-item {
    margin-bottom: 14px;
}

.cfg-item > label {
    display: block;
    color: #ddd;
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 4px;
}

.cfg-desc {
    color: #777;
    font-size: 12px;
    margin: 0 0 10px 0;
}

.cfg-option-row {
    display: flex;
    gap: 10px;
}

.cfg-option-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid #333;
    border-radius: 8px;
    color: #888;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.cfg-option-btn:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: #555;
    color: #ccc;
}

.cfg-option-btn.cfg-ativo {
    background: rgba(212, 175, 55, 0.12);
    border-color: #d4af37;
    color: #ffca28;
}

.cfg-icon {
    font-size: 22px;
}

.cfg-label {
    font-size: 13px;
    font-weight: bold;
}

.cfg-sublabel {
    font-size: 11px;
    opacity: 0.7;
}

/* Toggle checkbox row (ex: TaleSpire) */
.cfg-toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid #333;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.cfg-toggle-row:hover {
    background: rgba(255, 255, 255, 0.08);
}

.cfg-toggle-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.cfg-toggle-cb {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #d4af37;
    flex-shrink: 0;
}
