:root {
    /* 🟢 PALETA CLARA (CERULEAN GLASS) - AIRSOFT */
    --bg-main: #d4e9ec; 
    --panel-bg: rgba(255, 255, 255, 0.55); 
    --panel-border: rgba(255, 255, 255, 0.8); 
    --cyan-neon: #008080; 
    --gold-accent: #b38000; 
    --text-main: #1a363d; 
    --text-muted: #5e7e85; 
    --shadow-color: rgba(0, 128, 128, 0.15); 
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Rajdhani', sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(255, 255, 255, 0.6), transparent 35%),
        radial-gradient(circle at 85% 30%, rgba(0, 128, 128, 0.05), transparent 35%);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
    transition: background-color 0.5s ease; /* Transição suave na troca de tema */
}

.dashboard-container {
    display: flex;
    width: 100%;
    height: 100vh;
    position: relative;
}

/* SIDEBAR & LOGO */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, rgba(235, 245, 247, 0.9) 0%, rgba(200, 225, 230, 0.9) 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    padding: 2rem 1rem;
    box-shadow: 5px 0 20px var(--shadow-color);
    z-index: 1000;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    transition: transform 0.3s ease, background 0.5s ease;
}

.logo-container {
    position: relative;
    text-align: center;
    margin-bottom: 3rem;
}

.logo {
    width: 180px;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
    border: 3px solid #fff;
    max-width: 100%;
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
}

.menu-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    padding: 12px 20px;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.menu-btn:hover {
    color: var(--cyan-neon);
    background: rgba(255, 255, 255, 0.5);
    border-left: 3px solid var(--cyan-neon);
}

.menu-btn.active {
    background: #fff;
    color: var(--cyan-neon);
    border: 1px solid var(--panel-border);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--cyan-neon);
}

/* MAIN CONTENT & TABS LOGIC */
.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    width: 100%;
}

.content-section {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}

.content-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.5);
    padding-bottom: 1rem;
    flex-wrap: wrap;
    gap: 15px;
}

.topbar h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--cyan-neon);
    text-shadow: 0 2px 5px rgba(0,0,0,0.05);
    letter-spacing: 1px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-main);
    font-weight: 700;
    background: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    border: 1px solid var(--panel-border);
    box-shadow: 0 4px 10px var(--shadow-color);
}

.pulse {
    width: 12px;
    height: 12px;
    background-color: #2ecc71;
    border-radius: 50%;
    box-shadow: 0 0 10px #2ecc71;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(46, 204, 113, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

/* CARDS E PAINÉIS */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px var(--shadow-color);
    width: 100%;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--panel-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 1.2rem 1rem;
    border-radius: 16px;
    border: 1px solid var(--panel-border);
    box-shadow: 0 8px 20px var(--shadow-color);
    text-align: center;
    transition: transform 0.3s;
}

.stat-card:hover { transform: translateY(-5px); }
.stat-card h3 { color: var(--text-muted); font-size: 0.95rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.5rem; font-weight: 800; }
.cyber-number { font-size: 2.6rem; font-weight: 800; color: var(--cyan-neon); text-shadow: 0 2px 5px rgba(0,0,0,0.05); display: flex; justify-content: center; align-items: baseline; gap: 8px;}

.active-glow { border-top: 4px solid var(--cyan-neon); }
.gold-glow { border-top: 4px solid var(--gold-accent); }
.gold-glow .cyber-number { color: var(--gold-accent); }

/* GRID DE 60% e 40% */
.dashboard-split {
    display: flex;
    flex-direction: row;
    gap: 20px;
    width: 100%;
    align-items: stretch;
}

#card-lances { flex: 1.6; min-width: 0; }
#card-ranking { flex: 1; min-width: 320px; }

/* TABELAS */
.panel-section h2 { color: var(--cyan-neon); margin-bottom: 1.5rem; font-size: 1.5rem; letter-spacing: 1px; text-transform: uppercase; font-weight: 800; }
.table-container { overflow-x: auto; border-radius: 12px; background: rgba(255, 255, 255, 0.4); border: 1px solid var(--panel-border); width: 100%; -webkit-overflow-scrolling: touch; }
.cyber-table { width: 100%; border-collapse: collapse; min-width: 800px; }
.cyber-table th { text-align: left; padding: 15px; background: rgba(0, 128, 128, 0.08); color: var(--cyan-neon); border-bottom: 2px solid rgba(0, 128, 128, 0.15); font-weight: 800; letter-spacing: 1px; text-transform: uppercase; white-space: nowrap; }
.cyber-table td { padding: 15px; border-bottom: 1px solid rgba(0, 0, 0, 0.05); color: var(--text-main); font-weight: 600; }
.cyber-table tbody tr:hover { background: rgba(255, 255, 255, 0.8); }

.ranking-table { min-width: 100% !important; }
.ranking-table th, .ranking-table td { padding: 10px 5px; white-space: normal; }
.loading-text { text-align: center; color: var(--text-muted); font-style: italic; padding: 30px !important; }

/* FORMULÁRIOS */
.form-container { max-width: 600px; margin: 0 auto; }
.input-group { margin-bottom: 1.5rem; }
.input-group label { display: block; color: var(--text-main); margin-bottom: 0.5rem; font-weight: 800; font-size: 1.1rem; }
.input-group input, .input-group textarea, .input-group select { width: 100%; padding: 12px 15px; background: rgba(255, 255, 255, 0.8); border: 2px solid rgba(0, 128, 128, 0.2); border-radius: 8px; color: var(--text-main); font-weight: 600; font-size: 1.1rem; outline: none; transition: border 0.3s, box-shadow 0.3s; }
.input-group input:focus, .input-group textarea:focus, .input-group select:focus { border-color: var(--cyan-neon); box-shadow: 0 0 10px rgba(0, 128, 128, 0.15); background: #fff; }

.cyber-btn { background: var(--cyan-neon); color: #fff; border: none; padding: 12px 25px; font-size: 1.1rem; font-weight: 800; border-radius: 8px; cursor: pointer; transition: all 0.3s; width: 100%; text-transform: uppercase; letter-spacing: 1px; box-shadow: 0 4px 15px rgba(0, 128, 128, 0.3); }
.cyber-btn:hover { background: #006666; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0, 128, 128, 0.4); }

.action-btn { padding: 8px 15px; font-size: 0.9em; cursor: pointer; border: 2px solid; border-radius: 6px; background: #fff; font-weight: 800; transition: 0.3s; margin-right: 5px; text-transform: uppercase; display: inline-block; margin-bottom: 5px;}
.btn-edit { border-color: var(--cyan-neon); color: var(--cyan-neon); }
.btn-edit:hover { background: var(--cyan-neon); color: #fff; }
.btn-concluir { border-color: #2ecc71; color: #2ecc71; }
.btn-concluir:hover { background: #2ecc71; color: #fff; }
.btn-delete { border-color: #ff4c4c; color: #ff4c4c; }
.btn-delete:hover { background: #ff4c4c; color: #fff; }

/* MODAIS */
.login-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(26, 54, 61, 0.8); backdrop-filter: blur(10px); z-index: 9999; display: flex; justify-content: center; align-items: center; padding: 20px;}
.login-overlay.hidden { display: none; }
.login-box { background: rgba(255, 255, 255, 0.95); padding: 40px; border-radius: 20px; border: 2px solid var(--panel-border); width: 100%; max-width: 450px; box-shadow: 0 15px 50px rgba(0, 128, 128, 0.3); }

/* CAIXA DE RESULTADO */
.result-box { margin-top: 20px; padding: 20px; background: rgba(46, 204, 113, 0.1); border: 1px solid #2ecc71; border-radius: 8px; text-align: center; }
.result-box.error { background: rgba(231, 76, 60, 0.1); border-color: #e74c3c; }
.result-box.hidden { display: none; }
.result-box h3 { color: #2ecc71; margin-bottom: 15px; font-size: 1.3rem; }
.result-box p { font-size: 1.1rem; margin-bottom: 10px; }
.result-box .highlight { color: var(--gold-accent); font-size: 1.5rem; font-weight: bold; letter-spacing: 2px; }

/* MOBILE MENU */
.mobile-menu-btn { display: none; background: transparent; border: none; font-size: 2rem; color: var(--cyan-neon); cursor: pointer; padding: 5px; }
.sidebar-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 999; }

/* RESPONSIVIDADE */
@media (max-width: 1200px) { .stats-grid { grid-template-columns: repeat(2, 1fr) !important; } }
@media (max-width: 992px) { .dashboard-split { flex-direction: column; } #card-lances, #card-ranking { flex: auto; width: 100%; min-width: 100%; } .topbar h1 { font-size: 1.8rem; } }
@media (max-width: 768px) {
    .mobile-menu-btn { display: block; }
    .sidebar { position: fixed; left: -300px; top: 0; height: 100vh; width: 260px; }
    .sidebar.open { left: 0; }
    .sidebar-overlay.active { display: block; }
    .main-content { padding: 15px; }
    .topbar { flex-direction: column; align-items: stretch; gap: 15px; }
    .topbar > div { display: flex; justify-content: space-between; width: 100%; }
    .topbar h1 { font-size: 1.5rem; text-align: center; }
    .stats-grid { grid-template-columns: 1fr !important; }
    .cyber-number { font-size: 2.2rem; }
    .login-box { padding: 25px 15px; }
    .sub-tab-btn { display: block; width: 100%; margin-bottom: 10px; margin-right: 0; }
}

/* =========================================================================
   🎲 NOVO TEMA: BOARD GAMES (BASEADO NO LOGOTIPO)
   ========================================================================= */
body.theme-boardgames {
    /* Fundo Amarelo Mostarda/Dourado Clássico */
    --bg-main: #f3d47e; 
    --panel-bg: rgba(255, 255, 255, 0.7);
    --panel-border: rgba(50, 42, 30, 0.3);
    
    /* Cores principais: Grafite Escuro e Azul da Gravata */
    --cyan-neon: #322A1E; /* Textos e Títulos agora são Grafite escuro */
    --gold-accent: #b36b00; /* Um dourado mais forte para contraste */
    --text-main: #2b2419; /* Fonte principal marrom escuro */
    --text-muted: #5c4e3a;
    
    /* Sombras baseadas no Grafite */
    --shadow-color: rgba(50, 42, 30, 0.15);
}

/* Ajustes Específicos do Board Games */
body.theme-boardgames .sidebar {
    background: linear-gradient(180deg, rgba(243, 212, 126, 0.95) 0%, rgba(220, 185, 90, 0.95) 100%);
    border-right: 1px solid rgba(50, 42, 30, 0.2);
}

body.theme-boardgames .topbar h1 {
    color: #322A1E;
    text-shadow: 1px 1px 0px rgba(255,255,255,0.8);
}

body.theme-boardgames .cyber-btn {
    background: #322A1E; /* Botões escuros */
    color: #f3d47e; /* Texto amarelo */
    box-shadow: 0 4px 15px rgba(50, 42, 30, 0.3);
}

body.theme-boardgames .cyber-btn:hover {
    background: #1a150f;
    box-shadow: 0 6px 20px rgba(50, 42, 30, 0.5);
}

body.theme-boardgames .menu-btn:hover {
    color: #322A1E;
    background: rgba(255, 255, 255, 0.6);
    border-left: 3px solid #322A1E;
}

body.theme-boardgames .menu-btn.active {
    color: #322A1E;
    border-left: 4px solid #322A1E;
    background: rgba(255,255,255,0.9);
}

body.theme-boardgames .cyber-table th {
    background: rgba(50, 42, 30, 0.1);
    color: #322A1E;
    border-bottom: 2px solid #322A1E;
}

/* O azul da gravata será usado para os botões de ação e destaques */
body.theme-boardgames .btn-edit { border-color: #78C4D6; color: #1a363d; }
body.theme-boardgames .btn-edit:hover { background: #78C4D6; color: #1a363d; }
body.theme-boardgames .active-glow { border-top: 4px solid #78C4D6; }
body.theme-boardgames #active-auctions-count { color: #78C4D6; }

body.theme-boardgames .input-group input:focus, 
body.theme-boardgames .input-group textarea:focus, 
body.theme-boardgames .input-group select:focus { 
    border-color: #322A1E; 
    box-shadow: 0 0 10px rgba(50, 42, 30, 0.15); 
}

body.theme-boardgames .sub-tab-btn.active {
    border-color: #322A1E; background: rgba(50, 42, 30, 0.1); color: #322A1E;
}
body.theme-boardgames .sub-tab-btn:hover:not(.active) {
    border-color: #322A1E;
}