:root {
    /* Cores Fixas - Tema Piano Black & Tech Gold */
    --bg-body: #050505;
    --bg-sidebar: #0a0a0a;
    --bg-card: #121212;
    --bg-input: #080808;
    
    --primary-gradient: linear-gradient(135deg, #FFD700 0%, #DAA520 100%);
    --primary-color: #FFD700;
    --secondary-color: #DAA520;
    
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    
    /* Alias para compatibilidade com arquivos PHP existentes */
    --gold-primary: var(--primary-color);
    --bg-panel: var(--bg-card);
    
    --border-color: rgba(255, 215, 0, 0.15);
    --card-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
    --card-hover-shadow: 0 15px 35px rgba(255, 215, 0, 0.15);
    
    --success: #00d26a;
    --danger: #f72e2e;
    --warning: #f5a623;
    
    --radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; outline: none; }

body {
    font-family: 'Roboto', 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* --- Sidebar --- */
.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
    position: fixed;
    height: 100%;
    z-index: 100;
    box-shadow: 5px 0 20px rgba(0,0,0,0.5);
}

.sidebar-header {
    padding: 30px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(to bottom, rgba(255, 215, 0, 0.05), transparent);
}

.sidebar-header h2 {
    color: var(--text-main);
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 1.4rem;
}

.sidebar-header h2 span {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-menu {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 8px;
    overflow-y: auto;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius);
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.95rem;
    border: 1px solid transparent;
}

.menu-item:hover, .menu-item.active {
    background: rgba(255, 215, 0, 0.1);
    color: var(--text-main);
    border-color: rgba(255, 215, 0, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transform: translateX(5px);
}

.menu-item i { margin-right: 10px; width: 20px; text-align: center; }

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.btn-logout {
    color: var(--danger);
    text-decoration: none;
    font-weight: bold;
    display: block;
    padding: 10px;
    border: 1px solid rgba(247, 46, 46, 0.2);
    border-radius: var(--radius);
    transition: 0.3s;
}

.btn-logout:hover { background: rgba(247, 46, 46, 0.1); }

/* --- Main Content --- */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 40px;
    background: radial-gradient(circle at top right, rgba(255, 215, 0, 0.05), transparent 40%);
}

.page-header { margin-bottom: 40px; border-bottom: 1px solid var(--border-color); padding-bottom: 20px; }
.page-header h1 { font-size: 2.2rem; font-weight: 700; margin-bottom: 5px; }
.page-header p { color: var(--text-muted); }

/* --- Cards & Grid --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

/* Compatibilidade com card-grid usado no dashboard */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card, .cron-card, .control-card, .card {
    background-color: var(--bg-card);
    padding: 25px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card:hover, .cron-card:hover, .card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
    border-color: rgba(255, 215, 0, 0.3);
}

.stat-card h3, .cron-card h3 {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.stat-card .value, .cron-card .value {
    font-size: 2rem;
    font-weight: 700;
    background: var(--text-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-image: linear-gradient(to right, #FFD700, #DAA520);
}

/* --- Tables --- */
.table-container {
    background-color: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    margin-bottom: 30px;
}

table { width: 100%; border-collapse: collapse; }

th {
    background-color: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    padding: 18px;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 18px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 0.95rem;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background-color: rgba(255, 255, 255, 0.02); }

/* --- Buttons & Forms --- */
.btn-sm, .btn-cron, .btn-gold {
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    transition: 0.2s;
}

.btn-edit, .btn-primary, .btn-gold {
    background: var(--primary-gradient);
    color: #000;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}
.btn-edit:hover { filter: brightness(1.1); transform: translateY(-1px); }

.btn-danger {
    background: rgba(247, 46, 46, 0.1);
    color: var(--danger);
    border: 1px solid rgba(247, 46, 46, 0.3);
}
.btn-danger:hover { background: var(--danger); color: white; }

input, select, textarea {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 12px;
    border-radius: 8px;
    width: 100%;
    font-size: 0.95rem;
    transition: 0.3s;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

/* --- Badges --- */
.badge { padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: bold; text-transform: uppercase; }
.badge-success { background: rgba(0, 210, 106, 0.15); color: var(--success); border: 1px solid rgba(0, 210, 106, 0.2); }
.badge-danger { background: rgba(247, 46, 46, 0.15); color: var(--danger); border: 1px solid rgba(247, 46, 46, 0.2); }
.badge-warning { background: rgba(245, 166, 35, 0.15); color: var(--warning); border: 1px solid rgba(245, 166, 35, 0.2); }

/* --- Terminal / Logs --- */
.log-container {
    background: #000;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 15px;
    font-family: 'Consolas', monospace;
    color: #0f0;
    height: 400px;
    overflow-y: auto;
    font-size: 0.85rem;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
}
.log-entry { border-bottom: 1px solid #111; padding: 2px 0; }
.log-time { color: #555; margin-right: 10px; }

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-body); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #555; }

/* --- Login & Registro --- */
.login-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #1a1a1a 0%, #000000 100%);
    min-height: 100vh;
}

.login-box {
    width: 100%;
    max-width: 400px;
    background-color: var(--bg-card);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}

.login-box .brand {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.login-box .form-group { margin-bottom: 20px; }
.login-box label { display: block; margin-bottom: 8px; color: var(--text-muted); }
.login-box .btn-gold { width: 100%; padding: 14px; margin-top: 10px; font-weight: bold; cursor: pointer; font-size: 1rem; }
.login-box .alert { padding: 10px; margin-bottom: 15px; border-radius: 6px; background: rgba(247, 46, 46, 0.1); color: var(--danger); border: 1px solid rgba(247, 46, 46, 0.3); text-align: center; }
.login-box a { color: var(--primary-color); text-decoration: none; }

/* --- Documentation / Integration Guide --- */
.doc-content { line-height: 1.6; color: var(--text-muted); }
.doc-content h2 { color: var(--primary-color); margin-bottom: 15px; font-weight: 700; }
.doc-content h3 { color: var(--text-main); margin-bottom: 15px; margin-top: 25px; }
.doc-content p { margin-bottom: 15px; }
.doc-content hr { border: 0; border-top: 1px solid var(--border-color); margin: 30px 0; }
.doc-content ol { margin-left: 20px; margin-bottom: 20px; }
.doc-content li { margin-bottom: 10px; }
.doc-content code { color: var(--primary-color); background: var(--bg-input); padding: 4px 8px; border-radius: 4px; font-family: 'Consolas', monospace; border: 1px solid var(--border-color); }
.doc-content strong { color: var(--text-main); }

/* --- Widget Styles --- */
.widget-body { background: transparent; overflow: hidden; }
.widget-container { background-color: var(--bg-card); color: var(--text-main); border-radius: 8px; overflow: hidden; border: 1px solid var(--border-color); height: 100vh; display: flex; flex-direction: column; }
.widget-header { background: var(--bg-sidebar); padding: 10px; text-align: center; font-weight: bold; border-bottom: 1px solid var(--border-color); font-size: 14px; color: var(--primary-color); }
.widget-content { flex: 1; overflow-y: auto; padding: 0; scrollbar-width: thin; }
.loading { padding: 20px; text-align: center; color: var(--text-muted); font-size: 12px; }

/* Widget Game Items */
.game-item { padding: 12px 10px; border-bottom: 1px solid var(--border-color); }
.game-item:last-child { border-bottom: none; }
.team { display: flex; align-items: center; gap: 8px; width: 40%; }
.team.away { justify-content: flex-end; text-align: right; }
.team img { width: 24px; height: 24px; object-fit: contain; }
.team span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.info { width: 20%; text-align: center; display: flex; flex-direction: column; align-items: center; }
.score { font-weight: bold; color: var(--primary-color); font-size: 14px; }
.status { font-size: 9px; text-transform: uppercase; color: var(--text-muted); margin-top: 2px; }
.odds-values { display: flex; justify-content: space-around; margin-top: 8px; background: var(--bg-input); padding: 5px; border-radius: 4px; }
.odd-value { text-align: center; font-size: 11px; flex: 1; cursor: pointer; transition: background 0.2s; border-radius: 4px; padding: 4px; }
.odd-value:hover { background: rgba(255, 215, 0, 0.1); }
.odd-value .market { color: var(--text-muted); font-size: 10px; }
.odd-value .value { font-weight: bold; color: var(--primary-color); }

/* Widget Standings */
.standings-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.standings-table th, .standings-table td { padding: 8px 6px; text-align: center; border-bottom: 1px solid var(--border-color); }
.standings-table th { font-weight: bold; color: var(--text-muted); text-transform: uppercase; font-size: 10px; }
.standings-table td.team-name { text-align: left; display: flex; align-items: center; gap: 8px; }
.standings-table .team-logo { width: 18px; height: 18px; object-fit: contain; }
.standings-table .rank { font-weight: bold; width: 25px; }

/* --- Documentation Tabs (Jogos.php) --- */
.tabs { display: flex; gap: 10px; border-bottom: 1px solid var(--border-color); margin-bottom: 20px; }
.tab-link { padding: 10px 20px; text-decoration: none; color: var(--text-muted); font-weight: bold; border-bottom: 3px solid transparent; transition: 0.3s; }
.tab-link.active { color: var(--gold-primary); border-bottom-color: var(--gold-primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

.accordion-item { border: 1px solid var(--border-color); border-radius: 4px; margin-bottom: 10px; }
.accordion-header { background: var(--bg-panel); padding: 15px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.accordion-header h4 { margin: 0; color: var(--gold-primary); font-size: 1rem; }
.accordion-header .endpoint { font-family: monospace; background: #0a0a0a; padding: 5px 10px; border-radius: 4px; color: #4caf50; }
.accordion-body { padding: 20px; background: #0a0a0a; display: none; }
.code-tabs { display: flex; background: #1a1a1a; border-top-left-radius: 4px; border-top-right-radius: 4px; }
.code-tab { padding: 8px 15px; cursor: pointer; color: var(--text-muted); font-size: 0.8rem; }
.code-tab.active { background: #0a0a0a; color: var(--gold-primary); }
.code-content { background: #0a0a0a; padding: 15px; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; overflow-x: auto; }
.code-content pre { margin: 0; font-family: monospace; color: #e0e0e0; }
.code-block { display: none; }
.code-block.active { display: block; }

/* --- Wallet / Modal Styles (Carteira.php) --- */
.modal-overlay { position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.85); backdrop-filter: blur(5px); display: none; align-items: center; justify-content: center; }
.modal-content { background: var(--bg-panel); padding: 30px; border-radius: 12px; border: 1px solid var(--gold-primary); box-shadow: 0 0 20px rgba(212, 175, 55, 0.2); width: 90%; max-width: 500px; position: relative; text-align: center; }
.modal-close { position: absolute; top: 10px; right: 15px; color: var(--text-muted); font-size: 28px; font-weight: bold; border: none; background: none; cursor: pointer; }
.modal-close:hover { color: var(--gold-primary); }
.modal-content .form-group { text-align: left; }
.modal-content .btn-gold { width: 100%; padding: 14px; font-size: 1rem; margin-top: 10px; }
#ggrChart { max-height: 300px; margin-top: 20px; }

#pix-display img { margin: 15px auto; display: block; border: 4px solid #fff; border-radius: 8px; max-width: 200px; }
#pix-display .pix-code-container { position: relative; margin-top: 15px; }
#pix-display input[type="text"] { width: 100%; background: #0a0a0a; border: 1px solid #333; color: var(--gold-primary); padding: 12px; padding-right: 40px; border-radius: 6px; font-family: monospace; font-size: 0.9rem; }

.copy-btn {
    margin-top: 10px;
    width: 100%;
    background: #222;
    border: 1px solid #444;
    color: #fff;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}
.copy-btn:hover { background: #333; border-color: var(--gold-primary); }
.copy-btn.copied { background: #4caf50; border-color: #4caf50; color: #fff; }