/* Garantir que o conteúdo respeite a sidebar */
/* CONFIGURAÇÕES GERAIS E VARIÁVEIS */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;700&display=swap');

:root {
    /* Cores do Sistema */
    --bg-primary: #05060F;
    --bg-secondary: #050505;
    --bg-nav-item: #1C2133;
    --accent-red: #FF2D20;
    --accent-orange: #FF8655;
    --accent-orange-vibrant: #FF4D3A;
    --text-primary: #F5F6FF;
    --text-secondary: #8D97B4;
    --gray-blue: #8D97B4;

    /* Dimensões e Transições */
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 80px;
    --transition-speed: 0.4s;
}

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

body {
    font-family: 'JetBrains Mono', monospace;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    display: flex;
    min-height: 100vh;
}

/* Bolinhas de fundo padronizadas para todas as telas */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(255, 45, 32, 0.18) 1.5px, transparent 1.5px);
    background-size: 30px 30px;
    z-index: -1;
    pointer-events: none;
}

/* ESTILIZAÇÃO DA SIDEBAR */

.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--bg-primary);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    padding: 2.5rem 1rem;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: width var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
}

/* Versão Recolhida (Collapsed) */
.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
    padding: 2.5rem 0.5rem;
}

/* Cabeçalho do Menu */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 3rem;
    width: 100%;
    height: 40px;
}

.logo-container {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
    transition: all var(--transition-speed) ease;
}

.sidebar.collapsed .logo-container {
    opacity: 0;
    pointer-events: none;
}

.sidebar.collapsed .sidebar-header {
    justify-content: center;
}

.logo-container img {
    width: auto;
    height: 40px;
    max-width: 100%;
    object-fit: contain;
}

/* LINKS DE NAVEGAÇÃO */

.nav-links {
    flex-grow: 1;
    list-style: none;
    overflow-x: hidden;
}

.nav-item {
    margin-bottom: 0.75rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    text-decoration: none;
    color: var(--text-secondary);
    border-radius: 12px;
    transition: all 0.2s ease;
    font-weight: 500;
    gap: 1.25rem;
    white-space: nowrap;
}

.sidebar.collapsed .nav-link {
    padding: 1rem 0;
    justify-content: center;
    gap: 0;
}

.sidebar.collapsed .nav-link span {
    display: none;
}

.nav-link i {
    font-size: 1.25rem;
    color: var(--accent-orange-vibrant);
}

/* Estados de Hover e Ativo */
.nav-link:hover {
    background-color: rgba(28, 33, 51, 0.5);
    color: var(--text-primary);
}

.nav-item.active .nav-link {
    background-color: var(--bg-nav-item);
    color: var(--text-primary);
}

/* INDICADOR DE STATUS DA API */

.status-container {
    padding: 1rem 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 1rem;
    transition: all 0.3s;
}

.status-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.team-badge {
    color: var(--accent-orange);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 0.5px;
}

.sidebar.collapsed .status-container {
    justify-content: center;
    padding: 1rem 0;
}

.sidebar.collapsed .status-info {
    display: none;
}

/* Ponto de Status Animado */
.status-dot {
    width: 8px;
    height: 8px;
    background-color: #50fa7b;
    border-radius: 50%;
    box-shadow: 0 0 8px #50fa7b;
}

.status-dot.offline {
    background-color: var(--accent-red);
    box-shadow: 0 0 8px var(--accent-red);
}

.status-dot.online {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(80, 250, 123, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(80, 250, 123, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(80, 250, 123, 0);
    }
}

/* BOTÃO DE TOOGLE (EXPANDIR/RECOLHER) */

.toggle-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--gray-blue);
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.toggle-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
}

.sidebar.collapsed .toggle-btn {
    margin: 0;
}

/* AJUSTES DO CONTEÚDO PRINCIPAL */

.main-content {
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    padding: 3rem;
    min-height: 100vh;
    transition: margin-left var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
    width: calc(100% - var(--sidebar-width));
    min-width: 0;
}

.sidebar.collapsed+.main-content {
    margin-left: var(--sidebar-collapsed-width);
    width: calc(100% - var(--sidebar-collapsed-width));
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    letter-spacing: -1px;
}

/* Responsividade básica */
@media (max-width: 768px) {

    .sidebar,
    .sidebar.collapsed {
        width: var(--sidebar-collapsed-width);
        padding: 1.5rem 0.5rem;
    }

    .sidebar-header {
        justify-content: center;
    }

    .logo-container,
    .sidebar .nav-link span,
    .sidebar .status-info {
        display: none;
    }

    .nav-link {
        justify-content: center;
        gap: 0;
        padding: 1rem 0;
    }

    .main-content,
    .sidebar.collapsed+.main-content {
        margin-left: var(--sidebar-collapsed-width);
        width: calc(100% - var(--sidebar-collapsed-width));
        padding: 1.25rem;
    }
}