:root {
    --sidebar-width: 260px;
    --bg-color: #1a1a2e; /* Slightly lighter background */
    --sidebar-bg: #0f0f1a; /* Darker sidebar */
    --card-bg: #24243e;
    --text-primary: #f0f0f0;
    --text-secondary: #a0a0b0;
    --accent-blue: #2c2c4a; /* A more subtle accent for active item */
    --border-color: #3a3a5a;
}

html {
    font-size: 14px;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    margin: 0;
    overflow: hidden;
}

.dashboard-container {
    display: flex;
}

.sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #252538;
}

.sidebar-header {
    padding: 22px 20px;
    flex-shrink: 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.sidebar-nav-wrapper {
    flex-grow: 1;
    overflow-y: auto;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
    font-weight: 400;
    font-size: 0.95rem;
    border-radius: 6px;
    margin: 2px 10px;
}

.sidebar-nav li a:hover {
    background-color: var(--card-bg);
    color: var(--text-primary);
}

/* Style for the link that is currently active/selected */
.sidebar-nav li.active > a {
    background-color: var(--accent-blue);
    color: var(--text-primary);
    font-weight: 500;
}

.sidebar-nav li a .icon {
    margin-right: 15px;
    font-size: 1.1rem;
}

/* --- Corrected Collapsible Menu Styles --- */
.sidebar-nav .submenu {
    list-style: none;
    padding-left: 20px; /* Indentation for submenus */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.sidebar-nav .submenu .submenu {
    padding-left: 15px; /* Deeper indentation for level 3 */
}

.sidebar-nav li.has-submenu.open > .submenu {
    max-height: 1000px; /* Animate to open */
}

.sidebar-nav .arrow {
    margin-left: auto;
    transition: transform 0.3s;
    font-size: 0.7rem;
}

.sidebar-nav li.has-submenu.open > a .arrow {
    transform: rotate(90deg);
}


/* --- Main Content --- */
.main-content {
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    padding: 20px 40px;
    height: 100vh;
    overflow-y: auto;
}
.main-header h1 {
    font-size: 1.8rem;
    font-weight: 500;
    margin-bottom: 25px;
}
.content-pane { display: none; }
.content-pane.active { display: block; animation: fadeIn 0.5s; }

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

/* Other styles remain the same */
.widget-card, .tutorial-container { background-color: var(--card-bg); padding: 25px; border-radius: 12px; }
.chart-container { height: 300px; }
.video-container { margin: 25px 0; border-radius: 12px; overflow: hidden; background-color: #000; }
.tutorial-container h2 { font-size: 1.5rem; }