:root {
    /* Color Palette - Premium Dark */
    --bg: #0b0e14;
    --sidebar-bg: #11141b;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --primary: #3b82f6;
    --secondary: #6366f1;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

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

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

.app-container {
    display: flex;
    height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.nav-menu a {
    text-decoration: none;
    color: var(--text-muted);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-menu a:hover, .nav-menu a.active {
    background: var(--glass-bg);
    color: var(--text-main);
    transform: translateX(5px);
}

.nav-menu a.active {
    border-left: 3px solid var(--primary);
}

.bot-status {
    margin-top: auto;
    background: rgba(16, 185, 129, 0.05);
    padding: 1rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-indicator {
    width: 12px;
    height: 12px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--success);
}

/* Main Content Styling */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.05), transparent);
}

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

.search-box {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 0.75rem 1.25rem;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 350px;
}

.search-box input {
    background: transparent;
    border: none;
    color: var(--text-main);
    outline: none;
    width: 100%;
}

.refresh-control {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--glass-bg);
    padding: 0.5rem 1rem;
    border-radius: 100px;
}

.refresh-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

select {
    background: transparent;
    border: none;
    color: var(--text-main);
    outline: none;
    cursor: pointer;
}

.btn-refresh {
    background: var(--accent-gradient);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.btn-refresh:hover {
    transform: rotate(180deg);
}

/* Glassmorphism Cards */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--card-shadow);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(59, 130, 246, 0.3);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-icon.blue { background: rgba(59, 130, 246, 0.1); color: var(--primary); }
.stat-icon.green { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.stat-icon.purple { background: rgba(99, 102, 241, 0.1); color: var(--secondary); }
.stat-icon.cyan { background: rgba(6, 182, 212, 0.1); color: #06b6d4; }

.stat-info h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 2px; }
.stat-info p { color: var(--text-muted); font-size: 0.85rem; }

/* Dashboard Grid Panels */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.panel {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

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

.panel-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Signals List Styling */
.signals-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.signal-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.signal-card:hover {
    background: rgba(255, 255, 255, 0.04);
}

.signal-main {
    display: flex;
    justify-content: space-between;
}

.signal-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
}

.signal-badge {
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-edge { background: rgba(16, 185, 129, 0.1); color: var(--success); }

.signal-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.signal-reasoning {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 5px;
    border-left: 2px solid var(--primary);
    padding-left: 10px;
}

/* Table Styling */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    border-bottom: 1px solid var(--glass-border);
}

td {
    padding: 1rem;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.empty-msg {
    text-align: center;
    color: var(--text-muted);
    padding: 3rem;
    font-style: italic;
}

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