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

:root {
    --bg-deep: #080a0f;
    --sidebar-bg: #0f121a;
    --panel-bg: rgba(20, 26, 38, 0.7);
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.4);
    --secondary: #6366f1;
    --accent: #00f0ff;
    --danger: #ef4444;
    --success: #10b981;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.08);
}

* { box-sizing: border-box; transition: all 0.25s ease; }

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-deep);
    color: var(--text-main);
    margin: 0;
    overflow-x: hidden;
    height: 100vh;
}

/* 🌌 Background Mesh */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    background: radial-gradient(circle at 50% -20%, #1e293b 0%, var(--bg-deep) 60%);
}

/* 🏢 Sidebar Navigation */
.sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 2rem 1rem;
    position: relative;
    z-index: 100;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 1rem;
    margin-bottom: 3rem;
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px var(--primary-glow);
}

.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-radius: 12px;
    cursor: pointer;
    color: var(--text-muted);
    font-weight: 500;
    text-decoration: none;
}

.nav-item:hover, .nav-item.active {
    background: rgba(59, 130, 246, 0.1);
    color: var(--text-main);
}

.nav-item.active {
    border-left: 4px solid var(--primary);
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.15), transparent);
}

.nav-item i { font-size: 1.1rem; width: 24px; text-align: center; }

/* 🖥️ Main Viewing Area */
.main-view {
    flex: 1;
    overflow-y: auto;
    padding: 2.5rem;
    position: relative;
}

.view-section { display: none; }
.view-section.active { display: block; animation: slideUp 0.4s ease-out; }

@keyframes slideUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 🧩 Professional Panels */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 🚀 Bot Nodes Grid */
.bot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
}

.bot-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.bot-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 4px;
    background: var(--primary);
    opacity: 0.5;
}

.bot-card.inactive::before { background: var(--text-muted); }

.status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(0,0,0,0.2);
}

.status-active { color: var(--success); }
.status-idle { color: var(--text-muted); }

/* 🧾 Forms & Inputs */
.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.form-control {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border);
    color: var(--text-main);
    border-radius: 10px;
    padding: 12px 15px;
    font-size: 0.95rem;
    width: 100%;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
    background: rgba(0,0,0,0.3);
}

/* 🔘 Modern Buttons */
.btn-action {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px var(--primary-glow); }

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
}

.btn-ghost:hover { border-color: var(--primary); color: var(--text-main); }

/* 📱 Responsive */
@media (max-width: 992px) {
    .sidebar { width: 80px; padding: 2rem 0.5rem; }
    .nav-item span, .brand h4 { display: none; }
    .main-view { padding: 1.5rem; }
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Builder Modal Styles */
.builder-row {
    background: rgba(0,0,0,0.15);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}
