:root {
    /* --- CORES GLOBAIS --- */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-color: #090a0c;
    --card-bg: rgba(18, 20, 26, 0.6);
    --border-color: rgba(255, 255, 255, 0.08);

    /* Texto */
    --text-main: #ffffff;
    --text-dim: #718096;
    --text-link: #a0aec0;
    --white: #ffffff;

    /* Status & UI */
    --bn-accent-color: #667eea;
    --success-color: #48bb78;
    --error-color: #f56565;
    --warning-color: #f6ad55;

    /* Marcas LLM */
    --openai-brand: #10a37f;
    --anthropic-brand: #d97757;
    --google-brand: #4285f4;

    /* Dimensões & Sombras */
    --radius-lg: 16px;
    --radius-md: 8px;
    --bn-nav-height: 70px;
    --shadow-card: 0 20px 60px rgba(0, 0, 0, 0.15);
    --shadow-hover: 0 5px 15px rgba(102, 126, 234, 0.4);

    /* Glassmorphism */
    --bn-glass-bg: rgba(13, 14, 18, 0.8);
    --bn-glass-border: rgba(255, 255, 255, 0.05);
}

/* --- RESET GLOBAL --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.5;
    height: 100%;
    margin: 0;
    padding: 0;
}

/* --- SCROLLBAR MANAGEMENT --- */
/* Por defeito escondemos a barra (Estética BlackNode) */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none;
}

html,
body {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* --- NAVIGATION MENU (Crítico: reativado para evitar cortes) --- */
.bn-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--bn-nav-height);
    background: var(--bn-glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--bn-glass-border);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bn-nav-content {
    width: 100%;
    max-width: 1400px;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bn-logo {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--white);
    text-decoration: none;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bn-logo-dot {
    width: 8px;
    height: 8px;
    background: var(--bn-accent-color);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--bn-accent-color);
}

.bn-nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.bn-nav-item a {
    color: var(--text-link);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.bn-nav-item a:hover {
    color: var(--white);
}

.bn-has-nav {
    padding-top: var(--bn-nav-height);
}

/* --- COMPONENTES UI REUTILIZÁVEIS --- */
/* Botões */
.btn-primary {
    background: var(--primary-gradient);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    padding: 10px 20px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* Progress Bars */
.resource-bar {
    margin-bottom: 18px;
    width: 100%;
}

.bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-bottom: 6px;
}

.bar-bg {
    background: #1a1b1e;
    height: 6px;
    border-radius: 10px;
    overflow: hidden;
    width: 100%;
}

.bar-fill {
    background: var(--bn-accent-color);
    height: 100%;
    border-radius: 10px;
    width: 0%;
    /* Inicia a 0 para animar */
    box-shadow: 0 0 12px rgba(102, 126, 234, 0.4);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Status Indicators */
.status-indicator {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-indicator.online {
    background: rgba(72, 187, 120, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(72, 187, 120, 0.2);
}

.status-indicator.offline {
    background: rgba(245, 101, 101, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(245, 101, 101, 0.2);
}

/* Editable Fields */
.value.editable {
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    cursor: text;
    transition: all 0.2s;
    display: inline-block;
}

.value.editable:focus {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid var(--bn-accent-color);
    outline: none;
}