@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700;800&display=swap');

:root {
    --bg-dark: #000000;
    --panel-bg: rgba(10, 10, 10, 0.4);
    --primary: #ff0000;
    --primary-rgb: 255, 0, 0;
    --primary-glow: rgba(255, 0, 0, 0.15);
    --accent: #ff3333;
    --text-white: #ffffff;
    --text-gray: #a0a0a0;
    --border: rgba(255, 255, 255, 0.05);
    --sidebar-w: 230px;
    --radius-lg: 12px;
    --radius-md: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; outline: none; }

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-white);
    font-size: 0.88rem;
    line-height: 1.4;
    overflow-x: hidden;
}

.mobile-only { display: none !important; }
@media (max-width: 768px) {
    .mobile-only { display: flex !important; }
    .desktop-only { display: none !important; }
}

/* Layout Structure */
.app-wrapper { display: flex; width: 100%; min-height: 100vh; }

/* Sidebar */
.sidebar {
    width: var(--sidebar-w);
    background: #000;
    border-right: 1px solid var(--border);
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 1000;
}

.brand {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 2rem;
    text-align: center;
}
.brand span { color: var(--primary); }

.nav-menu { flex: 1; display: flex; flex-direction: column; gap: 4px; }

.nav-btn {
    padding: 0.6rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    color: var(--text-gray);
    font-size: 0.8rem;
    font-weight: 600;
}

.nav-btn:hover { background: rgba(255, 255, 255, 0.03); color: var(--text-white); }
.nav-btn.active {
    background: rgba(var(--primary-rgb), 0.05);
    color: var(--primary);
    border: 1px solid rgba(var(--primary-rgb), 0.1);
}

.nav-btn .icon { font-size: 1rem; margin-right: 12px; }

.credits-display {
    background: rgba(var(--primary-rgb), 0.05);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin: 1.5rem 0;
    border: 1px solid rgba(var(--primary-rgb), 0.1);
    text-align: center;
}

.credits-label { font-size: 0.6rem; font-weight: 800; color: var(--primary); letter-spacing: 1px; margin-bottom: 0.3rem; }
.credits-value { font-size: 1.4rem; font-weight: 800; }

.main-content {
    flex: 1;
    margin-left: var(--sidebar-w);
    padding: 2rem 3rem;
    width: calc(100% - var(--sidebar-w));
}

/* Panels & Cards */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 2rem; }

.stat-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.2rem;
    text-align: center;
}

.stat-value { font-size: 1.6rem; font-weight: 800; margin-bottom: 0.2rem; color: var(--primary); }
.stat-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-gray); }

/* Typography */
h1 { font-size: 1.6rem; font-weight: 800; margin-bottom: 0.5rem; }
h2 { font-size: 1.2rem; margin-bottom: 1rem; }
h3 { font-size: 1rem; margin-bottom: 0.8rem; }
.muted { color: var(--text-gray); font-size: 0.8rem; }

/* Buttons */
.btn {
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 5px 15px var(--primary-glow); }
.btn-danger { background: #333; color: #ff4444; }
.btn-danger:hover { background: #ff4444; color: white; }

.btn-discord {
    background: #5865F2;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Tables */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
th {
    text-align: left;
    padding: 0.7rem 1rem;
    color: var(--text-gray);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.65rem;
    border-bottom: 1px solid var(--border);
}
td { padding: 0.7rem 1rem; border-bottom: 1px solid var(--border); color: #ccc; }
tr:hover td { background: rgba(255, 255, 255, 0.02); }

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.7rem; font-weight: 700; margin-bottom: 0.3rem; color: var(--text-gray); }
.form-control {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.8rem 1rem;
    color: white;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}
.form-control:focus { 
    border-color: var(--primary); 
    background: rgba(var(--primary-rgb), 0.1);
    box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.2);
}

select.form-control {
    cursor: pointer;
    background-color: #151515 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 15px) center;
    appearance: none;
    -webkit-appearance: none;
    padding-right: 40px;
    color: white !important;
}

/* Força cores nas opções para evitar branco-no-branco em alguns navegadores */
select.form-control option {
    background-color: #1a1a1a !important;
    color: white !important;
}

/* Badge */
.badge { padding: 0.3rem 0.6rem; border-radius: 4px; font-size: 0.65rem; font-weight: 800; text-transform: uppercase; }
.badge-success { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.badge-primary { background: rgba(255, 0, 0, 0.1); color: #ff0000; }

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    align-items: flex-start !important;
    justify-content: center;
    overflow-y: auto !important;
    padding: 2rem 1rem;
}
.modal-content { 
    width: 95%; 
    max-width: 450px; 
    margin: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}
.modal::-webkit-scrollbar {
    width: 6px;
}
.modal::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
}
.modal::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
}
.modal::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Mobile Specific */
@media (max-width: 768px) {
    .mobile-header {
        display: flex !important;
        position: fixed;
        top: 0; left: 0; width: 100%; height: 60px;
        background: #000; border-bottom: 1px solid var(--border);
        z-index: 100001; padding: 0 15px;
        align-items: center; justify-content: space-between;
    }
    .mobile-menu-toggle { display: flex !important; flex-direction: column; gap: 4px; cursor: pointer; }
    .mobile-menu-toggle div { width: 22px; height: 2px; background: white; }

    .sidebar {
        width: 260px;
        transform: translateX(-100%);
        transition: 0.3s ease;
        z-index: 100005;
    }
    .sidebar.active { transform: translateX(0); }
    .main-content { margin-left: 0; width: 100%; padding: 80px 1rem 2rem 1rem; }
    
    .sidebar-overlay {
        display: none;
        position: fixed;
        top:0; left:0; width:100%; height:100%;
        background: rgba(0,0,0,0.85);
        z-index: 100002;
    }
    .sidebar-overlay.active { display: block; }
}

/* Login Page Specific */
.login-page {
    display: flex; justify-content: center; align-items: center;
    min-height: 100vh; padding: 20px; background: #000;
}
.login-box {
    width: 100%; max-width: 380px; padding: 2.5rem;
    background: rgba(15, 15, 15, 0.6);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    text-align: center;
}
.login-box .brand { font-size: 2.5rem; margin-bottom: 0.5rem; }
